From 24f27c0fe30b2c1f6bca194a1515112cf1bdfed3 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 19 Nov 2011 19:01:07 -0800 Subject: [PATCH] Pass generic connection errors to XMLStream.exception() --- sleekxmpp/xmlstream/xmlstream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index c3689ba..6fe6ec5 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -1112,9 +1112,10 @@ class XMLStream(object): except Socket.error as serr: self.event('socket_error', serr) log.exception('Socket Error') - except: + except Exception as e: if not self.stop.is_set(): log.exception('Connection error.') + self.exception(e) if not self.stop.is_set() and self.auto_reconnect: self.reconnect()