core: bug fix at connection time

This commit is contained in:
souliane 2014-02-07 22:17:06 +01:00
commit d0fccd5195

View file

@ -233,6 +233,16 @@ class SAT(service.Service):
info(_("already connected !"))
return defer.succeed("None")
if profile in self.profiles:
# avoid the following error when self.connect() is called twice for the same profile within a short time period:
# Jumping into debugger for post-mortem of exception ''SatXMPPClient' object has no attribute 'discoHandler'':
# > /usr/local/lib/python2.7/dist-packages/sat/plugins/plugin_xep_0115.py(151)generateHash()
# -> services = client.discoHandler.info(client.jid, client.jid, '').addCallback(generateHash_2, profile)
# This is a strange issue that is often happening on my system since libervia is being run as a twisted plugin.
# FIXME: properly find the problem an fix it
debug("being connected...")
return defer.succeed("None")
def afterMemoryInit(ignore):
"""This part must be called when we have loaded individual parameters from memory"""
try: