Also catch socket.timeout in IRCServer.read()

This commit is contained in:
jesopo 2018-09-17 20:59:35 +01:00
parent c3e667e0a1
commit 4a3dbeb7b8

View file

@ -211,7 +211,7 @@ class Server(object):
data = b""
try:
data = self.read_buffer + self.socket.recv(4096)
except ConnectionResetError:
except (ConnectionResetError, socket.timeout):
self.disconnect()
return []
self.read_buffer = b""