diff options
author | Lance Stout <lance@dingus.local> | 2011-05-27 11:01:30 -0700 |
---|---|---|
committer | Lance Stout <lance@dingus.local> | 2011-05-27 11:01:30 -0700 |
commit | 384e1a92b716250c168f5dedc1f9693111f81423 (patch) | |
tree | 431d0e7718f365a93ce01e5922e71c2d050bcac0 /sleekxmpp/xmlstream/xmlstream.py | |
parent | ec9aed5b751cac187b774794c7d8ca9de298838a (diff) | |
download | slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.tar.gz slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.tar.bz2 slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.tar.xz slixmpp-384e1a92b716250c168f5dedc1f9693111f81423.zip |
Added support for testind disconnect errors.
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 1c165562..468db032 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -978,7 +978,8 @@ class XMLStream(object): log.debug("SEND: %s" % data) try: self.socket.send(data.encode('utf-8')) - except: + except Socket.error as serr: + self.event('socket_error', serr) log.warning("Failed to send %s" % data) self.disconnect(self.auto_reconnect) except KeyboardInterrupt: |