diff --git a/src/core/constants.py b/src/core/constants.py index 6fc5e745..3189b229 100644 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -37,6 +37,7 @@ class Const(object): # Protocol XMPP_C2S_PORT = 5222 + XMPP_KEEP_ALIFE = 180 ## Parameters ## diff --git a/src/core/xmpp.py b/src/core/xmpp.py index 5d896a1b..2450a073 100644 --- a/src/core/xmpp.py +++ b/src/core/xmpp.py @@ -65,7 +65,7 @@ class SatXMPPClient(client.XMPPClient): """Called after _authd""" log.debug(_("XML stream is initialized")) self.keep_alife = task.LoopingCall(self.xmlstream.send, " ") # Needed to avoid disconnection (specially with openfire) - self.keep_alife.start(180) + self.keep_alife.start(C.XMPP_KEEP_ALIFE) self.disco = SatDiscoProtocol(self) self.disco.setHandlerParent(self)