mirror of
https://github.com/go-gost/gost.git
synced 2026-11-06 00:06:08 +00:00
Data the peer already sent stays unread in the stream and keeps occupying the connection level receive window of the quic session. When the local app aborts a download, that data is never consumed, so the credit is only returned when the read side of the stream is cancelled. Without the cancellation the window drains. The initial stream window is 512 KB and the initial connection window is 768 KB, so a few aborted downloads are enough to exhaust it. Once that happens the peer cannot send data on any stream of the session: new requests still reach the server, the server still acknowledges, there is no idle timeout and no error in the log, and the client waits forever for a response. Only a new session clears it. The test aborts three downloads of a body that is much larger than the flow control window, and then checks that the tunnel still forwards. The client reads very slowly, so the data piles up in the connection that carries it. Verified against go-gost/x#135: with the fix reverted the test fails with a timeout on the request that follows the aborted downloads, which is the reported symptom.