don't reconnect twice when connection is lost
This commit is contained in:
parent
759234f451
commit
f74c83535f
|
@ -885,6 +885,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
self.connection.disconnect()
|
||||
self.last_connection = None
|
||||
self.connection = None
|
||||
|
||||
def set_oldst(self): # Set old state
|
||||
if self.old_show:
|
||||
self.connected = gajim.SHOW_LIST.index(self.old_show)
|
||||
|
@ -913,6 +914,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
self.sm.enabled = False
|
||||
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
|
||||
show='error'))
|
||||
self.connection.UnregisterDisconnectHandler(self._disconnectedReconnCB)
|
||||
self.disconnect()
|
||||
if gajim.config.get_per('accounts', self.name, 'autoreconnect'):
|
||||
self.connected = -1
|
||||
|
|
Loading…
Reference in New Issue