mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-20 00:31:17 -08:00
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]>