From d3b4a4b8b45b95c99b7d804838955e584349b2a0 Mon Sep 17 00:00:00 2001 From: alemidev Date: Thu, 9 Dec 2021 12:39:15 +0100 Subject: [PATCH] catch brokenPipe error --- aiocraft/dispatcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiocraft/dispatcher.py b/aiocraft/dispatcher.py index 8e6635c..3d87577 100644 --- a/aiocraft/dispatcher.py +++ b/aiocraft/dispatcher.py @@ -229,7 +229,7 @@ class Dispatcher: except (asyncio.TimeoutError, TimeoutError): self._logger.error("Connection timed out") await self.disconnect(block=False) - except ConnectionResetError: + except (ConnectionResetError, BrokenPipeError): self._logger.error("Connection reset while reading packet") await self.disconnect(block=False) except (asyncio.IncompleteReadError, EOFError):