Commit 5460236e authored by zimio's avatar zimio

Catches more general exception on socket, then disconnect.

parent 82aeeb02
......@@ -252,6 +252,10 @@ class NonBlockingClient:
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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment