From d1adec53bec6e52ee6448375604e6c1a8c96c3d6 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 12 Dec 2012 22:03:13 +0100
Subject: [PATCH] don't reconnect a disabled account. Fixes #7265

---
 src/common/connection.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/common/connection.py b/src/common/connection.py
index 25208946a3..c2dfe9985a 100644
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -2668,6 +2668,9 @@ class Connection(CommonConnection, ConnectionHandlers):
         self.connection.send(message)
 
     def check_pingalive(self):
+        if not gajim.config.get_per('accounts', self.name, 'active'):
+            # Account may have been disabled
+            return
         if self.awaiting_xmpp_ping_id:
             # We haven't got the pong in time, disco and reconnect
             log.warn("No reply received for keepalive ping. Reconnecting.")
-- 
GitLab