From 3094bb77484da187dc67edac2dbfad52319d819a Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 26 Oct 2018 11:30:16 +0100 Subject: [PATCH] Specifically handle OSError (e.g. Network is unreachable) as a disconnect --- src/IRCServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IRCServer.py b/src/IRCServer.py index 3bac4fe0..e92cd291 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -221,7 +221,7 @@ class Server(IRCObject.Object): data = b"" try: data = self.socket.recv(4096) - except (ConnectionResetError, socket.timeout): + except (ConnectionResetError, socket.timeout, OSError): self.disconnect() return None if not data: