From 0c86f8288dceb67506f79a6522b0b8a6f8ffe214 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 14 Nov 2011 11:21:05 -0800 Subject: No need to continue processing loop if an error ocurred and auto_reconnect=False. --- sleekxmpp/xmlstream/xmlstream.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index aa7fd061..b6d013b0 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -1111,11 +1111,8 @@ class XMLStream(object): if not self.stop.is_set(): log.exception('Connection error.') - if not self.stop.is_set(): - if self.auto_reconnect: - self.reconnect() - else: - continue + if not self.stop.is_set() and self.auto_reconnect: + self.reconnect() else: self.disconnect() break -- cgit v1.2.3