Philipp Hörist pushed to branch master at gajim / gajim
Commits: 4f1a3a32 by Philipp Hörist at 2018-10-05T19:25:15Z Fix resume after sm timeout
Fixes #9364
- - - - -
1 changed file:
- gajim/common/connection.py
Changes:
===================================== gajim/common/connection.py ===================================== @@ -715,9 +715,20 @@ class Connection(CommonConnection, ConnectionHandlers): title=_('Connection with account "%s" has been lost') % self.name, msg=_('Reconnect manually.')))
+ def _on_resume_failed(self): + # SM resume failed, set all MUCs offline + # and lose the presence state of all contacts + app.nec.push_incoming_event(OurShowEvent( + None, conn=self, show='offline')) + def _event_dispatcher(self, realm, event, data): CommonConnection._event_dispatcher(self, realm, event, data) - if realm == nbxmpp.NS_REGISTER: + if realm == nbxmpp.NS_STREAM_MGMT: + if event == 'RESUME FAILED': + log.info('Resume failed') + self._on_resume_failed() + + elif realm == nbxmpp.NS_REGISTER: if event == nbxmpp.features_nb.REGISTER_DATA_RECEIVED: # data is (agent, DataFrom, is_form, error_msg) if self.new_account_info and \
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4f1a3a32c5c5d8f56c3126fca95f3fcc2d8...