From a9262c4e0a4c23f0ef596feda968dfa25c04b3d2 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Tue, 16 Jun 2009 11:59:55 +0000 Subject: * bugfixes --- sleekxmpp/xmlstream/xmlstream.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index ad2c5a1c..e5d5f583 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -194,8 +194,11 @@ class XMLStream(object): except KeyboardInterrupt: logging.debug("Keyboard Escape Detected") self.state.set('processing', False) + self.state.set('reconnect', False) self.disconnect() raise + except CloseStream: + break except: self.state.set('processing', False) traceback.print_exc() @@ -263,7 +266,7 @@ class XMLStream(object): except socket.error,(errno,strerror): logging.warning("Error while disconnecting. Socket Error #%s: %s" % (errno, strerror)) if self.state['processing']: - raise + raise CloseStream def reconnect(self): self.state.set('tls',False) -- cgit v1.2.3