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"" data = b""
try: try:
data = self.read_buffer + self.socket.recv(4096) data = self.read_buffer + self.socket.recv(4096)
except ConnectionResetError: except (ConnectionResetError, socket.timeout):
self.disconnect() self.disconnect()
return [] return []
self.read_buffer = b"" self.read_buffer = b""