Remove ping timeout on disconnect handler
This commit is contained in:
parent
b600328639
commit
5fd1e7b4bf
|
@ -675,6 +675,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
|
||||
def _disconnect(self):
|
||||
log.info('Set state disconnected')
|
||||
self.get_module('Ping').remove_timeout()
|
||||
self.connected = 0
|
||||
self.disable_reconnect_timer()
|
||||
|
||||
|
|
|
@ -66,10 +66,8 @@ class Ping:
|
|||
self.remove_timeout()
|
||||
|
||||
def _reconnect(self) -> None:
|
||||
if not app.config.get_per('accounts', self._account, 'active'):
|
||||
# Account may have been disabled
|
||||
if not app.account_is_connected(self._account):
|
||||
return
|
||||
|
||||
# We haven't got the pong in time, disco and reconnect
|
||||
log.warning('No reply received for keepalive ping. Reconnecting...')
|
||||
self._con.disconnect(immediately=True)
|
||||
|
|
Loading…
Reference in New Issue