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.connection.disconnect()
|
||||||
self.last_connection = None
|
self.last_connection = None
|
||||||
self.connection = None
|
self.connection = None
|
||||||
|
|
||||||
def set_oldst(self): # Set old state
|
def set_oldst(self): # Set old state
|
||||||
if self.old_show:
|
if self.old_show:
|
||||||
self.connected = gajim.SHOW_LIST.index(self.old_show)
|
self.connected = gajim.SHOW_LIST.index(self.old_show)
|
||||||
|
@ -913,6 +914,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
self.sm.enabled = False
|
self.sm.enabled = False
|
||||||
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
|
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
|
||||||
show='error'))
|
show='error'))
|
||||||
|
self.connection.UnregisterDisconnectHandler(self._disconnectedReconnCB)
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
if gajim.config.get_per('accounts', self.name, 'autoreconnect'):
|
if gajim.config.get_per('accounts', self.name, 'autoreconnect'):
|
||||||
self.connected = -1
|
self.connected = -1
|
||||||
|
|
Loading…
Reference in New Issue