3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

Irc: catch OSError (bad file descriptor) errors; they usually mean we're disconnected

This commit is contained in:
James Lu 2015-07-25 22:51:00 -07:00
parent a38fe1ab90
commit 5eee8000dd

View File

@ -178,7 +178,7 @@ class Irc():
log.debug("(%s) -> %s", self.name, stripped_data)
try:
self.socket.send(data)
except AttributeError:
except (OSError, AttributeError):
log.debug("(%s) Dropping message %r; network isn't connected!", self.name, stripped_data)
def schedulePing(self):