Specifically handle OSError (e.g. Network is unreachable) as a disconnect
This commit is contained in:
parent
c5e1fafeb1
commit
3094bb7748
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue