INNER CODE UNIT · Go

_

docker/compose · relay/main_test.go:125

	_ = client.Close() // downstream fully gone: down->up finishes, up->down survives

	select {
	case <-finished:
		// reaped by the idle grace instead of hanging on the silent upstream
	case <-time.After(5 * time.Second):
		t.Fatal("forward still blocked on a half-open pair after the idle grace")
	}
}

// Half-close semantics survive the reaper: a response still flowing after the
// client half-closed its request side is relayed past the grace, not cut.
func TestForwardKeepsStreamingAfterHalfClose(t *testing.T) {
	restore := halfCloseIdleTimeout
	halfCloseIdleTimeout = 300 * time.Millisecond
	t.Cleanup(func() { halfCloseIdleTimeout = restore })

	upstream, err := net.Listen("tcp", "127.0.0.1:0")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…