[Git][gajim/python-nbxmpp][master] Fix BOSH disconnect

Philipp Hörist gitlab at dev.gajim.org
Sat Jan 26 23:56:13 CET 2019


Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
396c27a9 by Philipp Hörist at 2019-01-26T22:54:57Z
Fix BOSH disconnect

- - - - -


1 changed file:

- nbxmpp/dispatcher_nb.py


Changes:

=====================================
nbxmpp/dispatcher_nb.py
=====================================
@@ -623,7 +623,10 @@ class XMPPDispatcher(PlugIn):
                 continue
             if _id in self.on_responses:
                 if len(self._expected) == 1:
-                    self._owner.onreceive(None)
+                    if hasattr(self._owner, 'onreceive'):
+                        # With BOSH we get a terminating body with multiple stanzas
+                        # in it, we unplug BOSH before we parse the stanzas
+                        self._owner.onreceive(None)
                 resp, args = self.on_responses[_id]
                 del self.on_responses[_id]
                 if args is None:



View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/396c27a9462edc4fd4288b1ed7ee1b7ff64c2112

-- 
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/396c27a9462edc4fd4288b1ed7ee1b7ff64c2112
You're receiving this email because of your account on dev.gajim.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gajim.org/pipermail/commits/attachments/20190126/ccc6315e/attachment.html>


More information about the Commits mailing list