# HG changeset patch # User Goffi # Date 1542658105 -3600 # Node ID a8ec00731ce74176358c78baa5ceb283b8e3a01c # Parent f64f1158a26e7ae63451ec1c34a452a7b48a72ff core: removed whitespace ping (not needed anymore as we handle XMPP ping) diff -r f64f1158a26e -r a8ec00731ce7 sat/core/constants.py --- a/sat/core/constants.py Sun Nov 18 15:49:59 2018 +0100 +++ b/sat/core/constants.py Mon Nov 19 21:08:25 2018 +0100 @@ -49,7 +49,6 @@ ## Protocol ## XMPP_C2S_PORT = 5222 - XMPP_KEEP_ALIFE = 180 XMPP_MAX_RETRIES = None # default port used on Prosody, may differ on other servers XMPP_COMPONENT_PORT = 5347 diff -r f64f1158a26e -r a8ec00731ce7 sat/core/xmpp.py --- a/sat/core/xmpp.py Sun Nov 18 15:49:59 2018 +0100 +++ b/sat/core/xmpp.py Mon Nov 19 21:08:25 2018 +0100 @@ -20,7 +20,7 @@ from sat.core.i18n import _ from sat.core.constants import Const as C from sat.memory import cache -from twisted.internet import task, defer +from twisted.internet import defer from twisted.words.protocols.jabber.xmlstream import XMPPHandler from twisted.words.protocols.jabber import xmlstream from twisted.words.protocols.jabber import error @@ -241,10 +241,6 @@ ) # we send the signal to the clients - self.keep_alife = task.LoopingCall( - self.xmlstream.send, " " - ) # Needed to avoid disconnection (specially with openfire) - self.keep_alife.start(C.XMPP_KEEP_ALIFE) self.disco = SatDiscoProtocol(self) self.disco.setHandlerParent(self) self.discoHandler = disco.DiscoHandler() @@ -284,10 +280,6 @@ super(SatXMPPEntity, self)._connected(xs) def disconnectProfile(self, reason): - try: - self.keep_alife.stop() - except AttributeError: - log.debug(_("No keep_alife")) if self._connected_d is not None: self.host_app.bridge.disconnected( self.profile