diff sat/core/xmpp.py @ 2694:a8ec00731ce7

core: removed whitespace ping (not needed anymore as we handle XMPP ping)
author Goffi <goffi@goffi.org>
date Mon, 19 Nov 2018 21:08:25 +0100
parents f64f1158a26e
children 2ea2369ae7de
line wrap: on
line diff
--- 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