From 00d46ee2b0fe4c0d76525d284dcc7ed588e701af Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Fri, 21 Aug 2009 00:26:57 +0000 Subject: * fixed xmlstream bugs with unexpected disconnect --- sleekxmpp/xmlstream/xmlstream.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index c2a581aa..a3f3d2ee 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -258,10 +258,11 @@ class XMLStream(object): data = data.encode('utf-8') try: self.socket.send(data) - except socket.error,(errno, strerror): + #except socket.error,(errno, strerror): + except: self.state.set('connected', False) if self.state.reconnect: - logging.error("Disconnected. Socket Error #%s: %s" % (errno,strerror)) + logging.error("Disconnected. Socket Error.") self.disconnect(reconnect=True) return False return True -- cgit v1.2.3