don't reconnect a disabled account. Fixes #7265

This commit is contained in:
Yann Leboulanger 2012-12-12 22:03:13 +01:00
parent 12cf1eba1f
commit d1adec53be
1 changed files with 3 additions and 0 deletions

View File

@ -2668,6 +2668,9 @@ class Connection(CommonConnection, ConnectionHandlers):
self.connection.send(message) self.connection.send(message)
def check_pingalive(self): 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: if self.awaiting_xmpp_ping_id:
# We haven't got the pong in time, disco and reconnect # We haven't got the pong in time, disco and reconnect
log.warn("No reply received for keepalive ping. Reconnecting.") log.warn("No reply received for keepalive ping. Reconnecting.")