From bf8a9dc20d570d16ff9a0761e504c196cfcebee3 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 29 Apr 2012 14:48:14 -0700 Subject: [PATCH] Add logging note about potential cause of disconnect() deadlock. --- sleekxmpp/xmlstream/xmlstream.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 62083de8..34c9773c 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -1204,7 +1204,9 @@ class XMLStream(object): self.__thread_count) self.__thread_cond.wait(4) if self.__thread_count != 0: - raise Exception("Hanged threads: %s" % threading.enumerate()) + log.error("Hanged threads: %s" % threading.enumerate()) + log.error("This may be due to calling disconnect() " + \ + "from a non-threaded event handler.") def process(self, **kwargs): """Initialize the XML streams and begin processing events.