disconnection is a heavy thing. we should always inform the user. so informing him on keepalive-related disconnection
This commit is contained in:
parent
bfca18b3a9
commit
834f90ff5a
|
@ -1611,8 +1611,10 @@ class Connection:
|
|||
if time.time() > (self.last_incoming + \
|
||||
keep_alive_disconnect_after_foo_secs):
|
||||
self.connection.disconnect() # disconnect if no answer
|
||||
msg = _('%s seconds have passed and server did not reply to our keepalive. Gajim disconnected from %s') % (str(keep_alive_disconnect_after_foo_secs), self.name)
|
||||
gajim.log.debug(msg)
|
||||
pritext = _('Gajim disconnected you from %s') % self.name
|
||||
sectext = _('%s seconds have passed and server did not reply to our keepalive. If you believe such disconnection should not have happend, you can disable sending keepalive packets by modifying this account') % str(keep_alive_disconnect_after_foo_secs)
|
||||
#FIXME: perhaps we should ask the user to confirm disconnectio?
|
||||
self.dispatch('ERROR', (pirtext, sectext))
|
||||
return
|
||||
if self.connection:
|
||||
self.connection.Process(timeout)
|
||||
|
|
Loading…
Reference in New Issue