summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 23aef6b7..666ab0a2 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -290,10 +290,10 @@ class XMLStream(object):
self.send_raw(self.stream_footer)
# Wait for confirmation that the stream was
# closed in the other direction.
- time.sleep(1)
if not reconnect:
self.auto_reconnect = False
self.stop.set()
+ time.sleep(1)
try:
self.socket.close()
self.filesocket.close()