diff options
author | Lance Stout <lancestout@gmail.com> | 2012-08-04 21:10:45 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-08-04 21:10:45 -0700 |
commit | 80a90a6221733d0985f0d585b3abbd1d8fab70b0 (patch) | |
tree | 6f0dbd09f453fa44d5fe5fd0b60341eb148e5315 | |
parent | 2324c90232aa7815f130761f1215704b391415fb (diff) | |
download | slixmpp-80a90a6221733d0985f0d585b3abbd1d8fab70b0.tar.gz slixmpp-80a90a6221733d0985f0d585b3abbd1d8fab70b0.tar.bz2 slixmpp-80a90a6221733d0985f0d585b3abbd1d8fab70b0.tar.xz slixmpp-80a90a6221733d0985f0d585b3abbd1d8fab70b0.zip |
Prevent auto_reconnect interference when disconnecting.
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 51dc25ed..4e5e2fe4 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -692,11 +692,13 @@ class XMLStream(object): if send_close: self.send_raw(self.stream_footer, now=True) + if not reconnect: + self.auto_reconnect = False + # Wait for confirmation that the stream was # closed in the other direction. If we didn't # send a stream footer we don't need to wait # since the server won't know to respond. - self.auto_reconnect = reconnect if send_close: log.info('Waiting for %s from server', self.stream_footer) self.stream_end_event.wait(4) |