Commit 24d94521 authored by Yann Leboulanger's avatar Yann Leboulanger

prevent traceback

parent 05c63682
......@@ -913,7 +913,9 @@ def _disconnectedReconnCB(self):
self.sm.enabled = False
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
show='error'))
self.connection.UnregisterDisconnectHandler(self._disconnectedReconnCB)
if self.connection:
self.connection.UnregisterDisconnectHandler(
self._disconnectedReconnCB)
self.disconnect()
if gajim.config.get_per('accounts', self.name, 'autoreconnect'):
self.connected = -1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment