From d0fccd5195c2ecc9801568c48dc2fd1a0813b97f Mon Sep 17 00:00:00 2001 From: souliane Date: Fri, 7 Feb 2014 22:17:06 +0100 Subject: [PATCH] core: bug fix at connection time --- src/core/sat_main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/sat_main.py b/src/core/sat_main.py index a2a7bd49..81f1dd44 100644 --- a/src/core/sat_main.py +++ b/src/core/sat_main.py @@ -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: