From ed049c7a9dbe613a05c9e05990dcb36babf2d4cb Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 19 Nov 2018 21:08:25 +0100 Subject: [PATCH] core: removed whitespace ping (not needed anymore as we handle XMPP ping) --- sat/core/constants.py | 1 - sat/core/xmpp.py | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/sat/core/constants.py b/sat/core/constants.py index 055d6cc5..7ca4d7ba 100644 --- a/sat/core/constants.py +++ b/sat/core/constants.py @@ -49,7 +49,6 @@ class Const(object): ## 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 --git a/sat/core/xmpp.py b/sat/core/xmpp.py index ea907046..6291e64e 100644 --- a/sat/core/xmpp.py +++ b/sat/core/xmpp.py @@ -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 @@ class SatXMPPEntity(object): ) # 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 @@ class SatXMPPEntity(object): 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