Mercurial > libervia-backend
comparison src/core/sat_main.py @ 834:2d901b7fa861
core: bug fix at connection time
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 07 Feb 2014 22:17:06 +0100 |
parents | 1a1600491d9d |
children | 59d486726577 |
comparison
equal
deleted
inserted
replaced
833:9bac2fc74968 | 834:2d901b7fa861 |
---|---|
231 | 231 |
232 if self.isConnected(profile): | 232 if self.isConnected(profile): |
233 info(_("already connected !")) | 233 info(_("already connected !")) |
234 return defer.succeed("None") | 234 return defer.succeed("None") |
235 | 235 |
236 if profile in self.profiles: | |
237 # avoid the following error when self.connect() is called twice for the same profile within a short time period: | |
238 # Jumping into debugger for post-mortem of exception ''SatXMPPClient' object has no attribute 'discoHandler'': | |
239 # > /usr/local/lib/python2.7/dist-packages/sat/plugins/plugin_xep_0115.py(151)generateHash() | |
240 # -> services = client.discoHandler.info(client.jid, client.jid, '').addCallback(generateHash_2, profile) | |
241 # This is a strange issue that is often happening on my system since libervia is being run as a twisted plugin. | |
242 # FIXME: properly find the problem an fix it | |
243 debug("being connected...") | |
244 return defer.succeed("None") | |
245 | |
236 def afterMemoryInit(ignore): | 246 def afterMemoryInit(ignore): |
237 """This part must be called when we have loaded individual parameters from memory""" | 247 """This part must be called when we have loaded individual parameters from memory""" |
238 try: | 248 try: |
239 port = int(self.memory.getParamA("Port", "Connection", profile_key=profile)) | 249 port = int(self.memory.getParamA("Port", "Connection", profile_key=profile)) |
240 except ValueError: | 250 except ValueError: |