core: removed whitespace ping (not needed anymore as we handle XMPP ping)

This commit is contained in:
Goffi 2018-11-19 21:08:25 +01:00
commit ed049c7a9d
2 changed files with 1 additions and 10 deletions

View file

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

View file

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