From 297697973fa6ddf4c3a736b9251bd8c93a1e7f4d Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Sat, 9 Apr 2022 04:03:42 -0400 Subject: [PATCH] Catch a possible non-cancel exception when terminating Node module --- matrix_appservice_kakaotalk/rpc/rpc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix_appservice_kakaotalk/rpc/rpc.py b/matrix_appservice_kakaotalk/rpc/rpc.py index 6c5bbf2..3626260 100644 --- a/matrix_appservice_kakaotalk/rpc/rpc.py +++ b/matrix_appservice_kakaotalk/rpc/rpc.py @@ -275,6 +275,9 @@ class RPCClient: except asyncio.LimitOverrunError as e: self.log.warning(f"Buffer overrun: {e}") line += await self._reader.read(self._reader._limit) + except ConnectionResetError: + if self._reader is not None: + raise except asyncio.CancelledError: raise if not line: