Skip to content

Commit

Permalink
docs: note client potentially ignoring connection reset
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thegamecracks committed Dec 10, 2024
1 parent cbe2724 commit c80d976
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dumdum/client/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c80d976

Please sign in to comment.