From b5c3bfeb6cf5f2a1612eb85934ef96ea5692e5bf Mon Sep 17 00:00:00 2001 From: alemidev Date: Mon, 6 Dec 2021 19:34:43 +0100 Subject: [PATCH] disconnect on unhandled exception in dispatcher --- aiocraft/dispatcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aiocraft/dispatcher.py b/aiocraft/dispatcher.py index 4f497a3..b5d479c 100644 --- a/aiocraft/dispatcher.py +++ b/aiocraft/dispatcher.py @@ -237,6 +237,7 @@ class Dispatcher: await self.disconnect(block=False) except Exception: self._logger.exception("Exception parsing packet %d | %s", packet_id, buffer.getvalue()) + await self.disconnect(block=False) async def _up_worker(self, timeout=1): while self._dispatching: