Files
Yunus Emre Karaman a6baab333a net/memnet: implement CloseRead and CloseWrite
tcpproxy propagates a backend's close to the client by calling CloseWrite
on the source connection. connHalf did not implement it, so the call was a
no-op and the client never saw EOF. TestTCPRoundRobinHandler only unblocked
the proxy's remaining copy goroutine by writing more data after the first
echo. When the backend closed with that data still buffered in the pipe,
the write was discarded and the test hung until the 10 minute timeout.

Implement both halves of the half-close contract on connHalf. A new test
covers buffered data surviving CloseWrite, EOF on the read after it, and
writes failing after CloseRead.

Fixes #17533

Signed-off-by: Yunus Emre Karaman <[email protected]>
2026-11-15 10:35:58 -08:00
..