core: move XMPP keep-alife value to the constants

This commit is contained in:
souliane 2014-09-21 13:06:53 +02:00
commit a67c8094f5
2 changed files with 2 additions and 1 deletions

View file

@ -37,6 +37,7 @@ class Const(object):
# Protocol
XMPP_C2S_PORT = 5222
XMPP_KEEP_ALIFE = 180
## Parameters ##

View file

@ -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)