From b906423cfb6daece18c4b04c0d9bb5eb00dc165e Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 27 Dec 2018 09:21:10 +0100 Subject: [PATCH] plugin XEP-0198: rised ACK_TIMEOUT + set req_time to None when timing out to be ready after resuming --- sat/plugins/plugin_xep_0198.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sat/plugins/plugin_xep_0198.py b/sat/plugins/plugin_xep_0198.py index 052abcea..bda465e5 100755 --- a/sat/plugins/plugin_xep_0198.py +++ b/sat/plugins/plugin_xep_0198.py @@ -60,7 +60,7 @@ MAX_DELAY_ACK_R = 30 MAX_COUNTER = 2**32 RESUME_MAX = 5*60 # if we don't have an answer to ACK REQUEST after this delay, connection is aborted -ACK_TIMEOUT = 25 +ACK_TIMEOUT = 35 class ProfileSessionData(object): @@ -137,7 +137,7 @@ class XEP_0198(object): if not self._ack_timeout: log.info(_(u"Ack timeout disabled")) else: - log.info(_(u"Ack timeout set to {timeout} s").format( + log.info(_(u"Ack timeout set to {timeout}s").format( timeout=self._ack_timeout)) def profileConnecting(self, client): @@ -452,6 +452,7 @@ class XEP_0198(object): """Called when a requested ACK has not been received in time""" log.info(_(u"Ack was not received in time, aborting connection")) client.xmlstream.transport.abortConnection() + client._xep_0198_session.req_time = None class XEP_0198_handler(xmlstream.XMPPHandler):