From b2b04c8e7501c2abc9e83317d9da4047b76ef5d9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 25 Mar 2016 17:03:25 -0700 Subject: [PATCH] classes: really ignore errors when shutting down sockets --- classes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes.py b/classes.py index 9b89f46..22917a4 100644 --- a/classes.py +++ b/classes.py @@ -305,11 +305,12 @@ class Irc(): log.removeHandler(self.loghandlers.pop()) try: - log.debug('(%s) _disconnect: Shutting down and closing socket.', self.name) + log.debug('(%s) _disconnect: Shutting down socket.', self.name) self.socket.shutdown(socket.SHUT_RDWR) - self.socket.close() except: # Socket timed out during creation; ignore - log.exception('(%s) _disconnect: Failed to close/shutdown socket.', self.name) + pass + + self.socket.close() if self.pingTimer: log.debug('(%s) Canceling pingTimer at %s due to disconnect() call', self.name, time.time())