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""
|
data = b""
|
||||||
try:
|
try:
|
||||||
data = self.socket.recv(4096)
|
data = self.socket.recv(4096)
|
||||||
except (ConnectionResetError, socket.timeout):
|
except (ConnectionResetError, socket.timeout, OSError):
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
return None
|
return None
|
||||||
if not data:
|
if not data:
|
||||||
|
|
Loading…
Reference in a new issue