diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 7f2c849..00af3d2 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -338,9 +338,9 @@ class XMLStream(object): ''' Disconnects and shuts down all event threads. ''' - self.disconnect() - self.quit.set() + self.run = False self.scheduler.run = False + self.disconnect() def incoming_filter(self, xmlobj): return xmlobj