forked from quic-go/quic-go
http3: fix off-by-one error when processing the GOAWAY stream ID (#5145)
This commit is contained in:
@@ -1188,14 +1188,12 @@ func testHTTPRequestAfterGracefulShutdown(t *testing.T, setGetBody bool) {
|
||||
require.Nil(t, req.GetBody)
|
||||
}
|
||||
|
||||
// By increasing the RTT, we make sure that the request is sent before the client receives the GOAWAY frame.
|
||||
inShutdown.Store(true)
|
||||
go server1.Shutdown(context.Background())
|
||||
go server2.ServeListener(ln)
|
||||
defer server2.Close()
|
||||
|
||||
// so that graceful shutdown can actually start
|
||||
time.Sleep(scaleDuration(10 * time.Millisecond))
|
||||
|
||||
resp, err = cl.Do(req)
|
||||
if !setGetBody {
|
||||
require.ErrorContains(t, err, "after Request.Body was written; define Request.GetBody to avoid this error")
|
||||
|
||||
Reference in New Issue
Block a user