core: move XMPP keep-alife value to the constants
This commit is contained in:
parent
a3a6e48797
commit
a67c8094f5
2 changed files with 2 additions and 1 deletions
|
|
@ -37,6 +37,7 @@ class Const(object):
|
|||
|
||||
# Protocol
|
||||
XMPP_C2S_PORT = 5222
|
||||
XMPP_KEEP_ALIFE = 180
|
||||
|
||||
|
||||
## Parameters ##
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue