Pass generic connection errors to XMLStream.exception()

This commit is contained in:
Lance Stout 2011-11-19 19:01:07 -08:00
parent 3019c82d8a
commit 24f27c0fe3

View file

@ -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()