mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
classes: really ignore errors when shutting down sockets
This commit is contained in:
parent
ce3d3cf697
commit
b2b04c8e75
@ -305,11 +305,12 @@ class Irc():
|
|||||||
log.removeHandler(self.loghandlers.pop())
|
log.removeHandler(self.loghandlers.pop())
|
||||||
|
|
||||||
try:
|
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.shutdown(socket.SHUT_RDWR)
|
||||||
self.socket.close()
|
|
||||||
except: # Socket timed out during creation; ignore
|
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:
|
if self.pingTimer:
|
||||||
log.debug('(%s) Canceling pingTimer at %s due to disconnect() call', self.name, time.time())
|
log.debug('(%s) Canceling pingTimer at %s due to disconnect() call', self.name, time.time())
|
||||||
|
Loading…
Reference in New Issue
Block a user