From f74c83535f02db363576d1e1826ef19d6c055589 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 26 Jul 2015 14:05:47 +0200 Subject: [PATCH] don't reconnect twice when connection is lost --- src/common/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/connection.py b/src/common/connection.py index 922de4cdd..0fc9d8120 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -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