Author: tomk Date: 2009-01-11 16:12:28 +0100 (Sun, 11 Jan 2009) New Revision: 10969
Modified: trunk/src/common/xmpp/client_nb.py Log: fixes #4657 - traceback on terminating stanza after BOSH init request
Modified: trunk/src/common/xmpp/client_nb.py =================================================================== --- trunk/src/common/xmpp/client_nb.py 2009-01-11 14:47:21 UTC (rev 10968) +++ trunk/src/common/xmpp/client_nb.py 2009-01-11 15:12:28 UTC (rev 10969) @@ -306,10 +306,18 @@ if data: self.Dispatcher.ProcessNonBlocking(data) if not hasattr(self, 'Dispatcher') or \ - self.Dispatcher.Stream._document_attrs is None: + self.Dispatcher.Stream._document_attrs is None: self._xmpp_connect_machine( mode='FAILURE', data='Error on stream open') + return + + # if terminating stanza was received after init request then client gets + # disconnected from bosh transport plugin and we have to end the stream + # negotiating process straight away. + # fixes #4657 + if not self.connected: return + if self.incoming_stream_version() == '1.0': if not self.got_features: on_next_receive('RECEIVE_STREAM_FEATURES')