add advanced option to configure the time we wait XMPP Ping answer
This commit is contained in:
parent
85cc4889ec
commit
a9e0ce5a0e
|
@ -296,6 +296,7 @@ class Config:
|
|||
'keep_alives_enabled': [ opt_bool, True],
|
||||
# send keepalive every N seconds of inactivity
|
||||
'keep_alive_every_foo_secs': [ opt_int, 55 ],
|
||||
'time_for_keep_alive_answer': [ opt_int, 20, _('How many seconds to wait for the answer of keepalive packet before we try to reconnect.') ],
|
||||
# try for 2 minutes before giving up (aka. timeout after those seconds)
|
||||
'try_connecting_for_foo_secs': [ opt_int, 60 ],
|
||||
'http_auth': [opt_str, 'ask'], # yes, no, ask
|
||||
|
|
|
@ -732,7 +732,8 @@ class Connection(ConnectionHandlers):
|
|||
self.connection.SendAndCallForResponse(iq, _on_response)
|
||||
else:
|
||||
self.connection.send(iq)
|
||||
gajim.idlequeue.set_alarm(self.check_keepalive, 5)
|
||||
gajim.idlequeue.set_alarm(self.check_keepalive, gajim.config.get_per(
|
||||
'accounts', self.name, 'time_for_keep_alive_answer')
|
||||
|
||||
def get_active_default_lists(self):
|
||||
if not self.connection:
|
||||
|
|
Loading…
Reference in New Issue