Catch IncompleteReadError
It can happen when the input stream closes after a timeout.
This commit is contained in:
parent
6f62eb0054
commit
d894eafc21
@ -152,6 +152,9 @@ class RPCClient:
|
||||
try:
|
||||
line += await self._reader.readuntil()
|
||||
break
|
||||
except asyncio.exceptions.IncompleteReadError as e:
|
||||
line += e.partial
|
||||
break
|
||||
except asyncio.exceptions.LimitOverrunError as e:
|
||||
self.log.warning(f"Buffer overrun: {e}")
|
||||
line += await self._reader.read(self._reader._limit)
|
||||
|
Loading…
Reference in New Issue
Block a user