Should not stop cancelling read if timeout'd

This commit is contained in:
atse 2024-07-04 17:30:49 +08:00
parent 9d271f97a2
commit 87ef1caf47
1 changed files with 1 additions and 2 deletions

View File

@ -93,8 +93,7 @@ class Client:
async def _command(self, *command): async def _command(self, *command):
async with self._command_lock: async with self._command_lock:
# protect the read-write process from being cancelled midway line = await self._read_write(command)
line = await asyncio.shield(self._read_write(command))
response = json.loads(line) response = json.loads(line)
logging.debug("%s: %s", command, response) logging.debug("%s: %s", command, response)