# HG changeset patch # User souliane # Date 1391807826 -3600 # Node ID 2d901b7fa861e52219f7f554d773ea08024aa217 # Parent 9bac2fc749685285d800c4149a878198eb84f4d4 core: bug fix at connection time diff -r 9bac2fc74968 -r 2d901b7fa861 src/core/sat_main.py --- a/src/core/sat_main.py Fri Feb 07 17:10:24 2014 +0100 +++ b/src/core/sat_main.py Fri Feb 07 22:17:06 2014 +0100 @@ -233,6 +233,16 @@ 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: