changeset 2cb44c8b1d79 in /home/hg/repos/gajim author: Yann Leboulanger <aste...@lagaule.org> branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=2cb44c8b1d79 description: Limit time to reconnect to 5 minutes. Fixes #8393
diffstat: src/common/connection.py | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diffs (20 lines): diff -r 1990a807b6b4 -r 2cb44c8b1d79 src/common/connection.py --- a/src/common/connection.py Wed Sep 07 05:47:23 2016 +0200 +++ b/src/common/connection.py Sun Sep 18 15:15:10 2016 +0200 @@ -949,13 +949,12 @@ gajim.status_before_autoaway[self.name] = '' self.old_show = 'online' # this check has moved from _reconnect method - # do exponential backoff until 15 minutes, - # then small linear increase + # do exponential backoff until less than 5 minutes if self.retrycount < 2 or self.last_time_to_reconnect is None: self.last_time_to_reconnect = 5 - if self.last_time_to_reconnect < 800: + self.last_time_to_reconnect += randomsource.randint(0, 5) + if self.last_time_to_reconnect < 200: self.last_time_to_reconnect *= 1.5 - self.last_time_to_reconnect += randomsource.randint(0, 5) self.time_to_reconnect = int(self.last_time_to_reconnect) log.info("Reconnect to %s in %ss", self.name, self.time_to_reconnect) gajim.idlequeue.set_alarm(self._reconnect_alarm, _______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits