# HG changeset patch # User souliane # Date 1411297613 -7200 # Node ID 9355f48f979ecc6fe74ca8066d437e4a1bbef399 # Parent 53037afd413ea73ad75989c415b9075a6508f754 core: move XMPP keep-alife value to the constants diff -r 53037afd413e -r 9355f48f979e src/core/constants.py --- a/src/core/constants.py Thu Sep 18 11:43:21 2014 +0200 +++ b/src/core/constants.py Sun Sep 21 13:06:53 2014 +0200 @@ -37,6 +37,7 @@ # Protocol XMPP_C2S_PORT = 5222 + XMPP_KEEP_ALIFE = 180 ## Parameters ## diff -r 53037afd413e -r 9355f48f979e src/core/xmpp.py --- a/src/core/xmpp.py Thu Sep 18 11:43:21 2014 +0200 +++ b/src/core/xmpp.py Sun Sep 21 13:06:53 2014 +0200 @@ -65,7 +65,7 @@ """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)