Author: asterix Date: 2008-02-08 08:47:35 +0100 (Fri, 08 Feb 2008) New Revision: 9313
Modified: trunk/src/common/config.py trunk/src/common/connection.py Log: add advanced option to configure the time we wait XMPP Ping answer
Modified: trunk/src/common/config.py =================================================================== --- trunk/src/common/config.py 2008-02-07 23:53:02 UTC (rev 9312) +++ trunk/src/common/config.py 2008-02-08 07:47:35 UTC (rev 9313) @@ -296,6 +296,7 @@ '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
Modified: trunk/src/common/connection.py =================================================================== --- trunk/src/common/connection.py 2008-02-07 23:53:02 UTC (rev 9312) +++ trunk/src/common/connection.py 2008-02-08 07:47:35 UTC (rev 9313) @@ -732,7 +732,8 @@ 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: