changeset 56ba7bd207d3 in /home/hg/repos/python-nbxmpp

details:http://hg.gajim.org/python-nbxmpp?cmd=changeset;node=56ba7bd207d3
description: Catches more general exception on socket, then disconnect.

diffstat:

 nbxmpp/client_nb.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 1c866be7c020 -r 56ba7bd207d3 nbxmpp/client_nb.py
--- a/nbxmpp/client_nb.py       Wed May 15 14:47:33 2013 +0200
+++ b/nbxmpp/client_nb.py       Sun May 26 12:30:51 2013 -0400
@@ -252,6 +252,10 @@
         except socket.gaierror, (errnum, errstr):
             self.disconnect(message='Lookup failure for %s:%s, hostname: %s - 
%s' %
                      (self.Server, self.Port, hostname, errstr))
+        except socket.error , (errnum, errstr):
+            # Catches an unexpected error with the socket
+            self.disconnect(message='General socket error for %s:%s, hostname: 
%s - %s' %
+                     (self.Server, self.Port, hostname, errstr))
         else:
             on_success()
 
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to