Except expected ConnectionError in the receive loop

This commit is contained in:
Lonami Exo 2018-10-26 10:36:33 +02:00
parent 0d8b15a109
commit b0e587c03d

View File

@ -163,7 +163,7 @@ class Connection(abc.ABC):
except asyncio.CancelledError:
pass
except Exception as e:
if isinstance(e, asyncio.IncompleteReadError):
if isinstance(e, (ConnectionError, asyncio.IncompleteReadError)):
msg = 'The server closed the connection'
__log__.info(msg)
elif isinstance(e, InvalidChecksumError):