Commit 5fd1e7b4 authored by Philipp Hörist's avatar Philipp Hörist

Remove ping timeout on disconnect handler

parent b6003286
Pipeline #2909 passed with stages
in 3 minutes and 34 seconds
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment