mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-18 00:15:44 +00:00
CodeRabbit pointed out that read_line returns InvalidData for bytes that are not UTF-8 while the socket stays open, and the helper treated every non-timeout error as a close. closed_by_peer() now accepts only ConnectionReset, ConnectionAborted, NotConnected and BrokenPipe, and the regression test pins InvalidData, TimedOut and WouldBlock as still open; the new assertion fails without the stricter match. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>