From c80d976e065181f8f90fea3326441815060b4bc0 Mon Sep 17 00:00:00 2001 From: thegamecracks <61257169+thegamecracks@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:11:39 -0500 Subject: [PATCH] docs: note client potentially ignoring connection reset Encountered this while adding the server message queue, where a server exception caused the client to raise ConnectionAbortedError in AsyncClient.send_message() > _drain() > _writer.drain() and yet the client was still attempting to read. --- src/dumdum/client/async_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dumdum/client/async_client.py b/src/dumdum/client/async_client.py index 4e09be1..dc68a8b 100644 --- a/src/dumdum/client/async_client.py +++ b/src/dumdum/client/async_client.py @@ -130,6 +130,8 @@ async def _read_loop( writer: asyncio.StreamWriter, ) -> None: while True: + # FIXME: may not terminate if drain() from another task results + # in connection reset data = await reader.read(1024) if len(data) == 0: break