You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http2: in TestContentEncodingNoSniffing, do not allow the Transport to outlive the serverTester
This test constructed a new serverTester for each subtest, but reused
a Transport across all of the tests. I don't fully understand why, but
for some reason that occasionally led to "connection reset by peer"
failures when the port was reused.
Scoping the Transport to the lifetime of the serverTester seems to
resolve the errors: I tested with
go test ./http2 -run=TestContentEncodingNoSniffing -httptest.serve=127.0.0.1:8080 -count=10000
and got lots of failures prior to this change and none after.
Fixesgolang/go#46762
(I hope.)
Change-Id: I385c077c1d8627e42ce4d2db041878aacb5452fb
Reviewed-on: https://go-review.googlesource.com/c/net/+/380154
Trust: Bryan Mills <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
0 commit comments