changeset 2729:edd230651138

plugin XEP-0198: rised ACK_TIMEOUT + set req_time to None when timing out to be ready after resuming
author Goffi <goffi@goffi.org>
date Thu, 27 Dec 2018 09:21:10 +0100
parents 1b11da85492c
children b4c0a5bec729
files sat/plugins/plugin_xep_0198.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0198.py	Wed Dec 26 17:21:39 2018 +0100
+++ b/sat/plugins/plugin_xep_0198.py	Thu Dec 27 09:21:10 2018 +0100
@@ -60,7 +60,7 @@
 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 @@
         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 @@
         """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):