3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-20 07:20:59 +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) log.debug("(%s) -> %s", self.name, stripped_data)
try: try:
self.socket.send(data) self.socket.send(data)
except AttributeError: except (OSError, AttributeError):
log.debug("(%s) Dropping message %r; network isn't connected!", self.name, stripped_data) log.debug("(%s) Dropping message %r; network isn't connected!", self.name, stripped_data)
def schedulePing(self): def schedulePing(self):