catch brokenPipe error

This commit is contained in:
əlemi 2021-12-09 12:39:15 +01:00
parent 96e76fca4c
commit d3b4a4b8b4

View file

@ -229,7 +229,7 @@ class Dispatcher:
except (asyncio.TimeoutError, TimeoutError): except (asyncio.TimeoutError, TimeoutError):
self._logger.error("Connection timed out") self._logger.error("Connection timed out")
await self.disconnect(block=False) await self.disconnect(block=False)
except ConnectionResetError: except (ConnectionResetError, BrokenPipeError):
self._logger.error("Connection reset while reading packet") self._logger.error("Connection reset while reading packet")
await self.disconnect(block=False) await self.disconnect(block=False)
except (asyncio.IncompleteReadError, EOFError): except (asyncio.IncompleteReadError, EOFError):