Catch a possible non-cancel exception when terminating Node module

This commit is contained in:
Andrew Ferrazzutti 2022-04-09 04:03:42 -04:00
parent 61d9a60704
commit 297697973f
1 changed files with 3 additions and 0 deletions

View File

@ -275,6 +275,9 @@ class RPCClient:
except asyncio.LimitOverrunError as e: except asyncio.LimitOverrunError as e:
self.log.warning(f"Buffer overrun: {e}") self.log.warning(f"Buffer overrun: {e}")
line += await self._reader.read(self._reader._limit) line += await self._reader.read(self._reader._limit)
except ConnectionResetError:
if self._reader is not None:
raise
except asyncio.CancelledError: except asyncio.CancelledError:
raise raise
if not line: if not line: