зеркало из https://github.com/golang/net.git
net/http: deflake TestTransportRetryAfterGOAWAY
Drop a redundant Close of a net.Conn. On Windows, writing to a closed connection will cause future reads from the connection to fail, even if there is buffered data available. When the test server writes a GOAWAY frame and immediately closes the connection, this can result in the client never seeing the GOAWAY. To avoid this, don't close server connections until after all test functions have returned. Fixes golang/go#59919 Change-Id: I82ed15870f3e6cd47f833a7a60b007b2fa2e15b0 Reviewed-on: https://go-review.googlesource.com/c/net/+/496056 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Родитель
abee42a2ab
Коммит
056145cf62
|
@ -3783,7 +3783,6 @@ func testClientMultipleDials(t *testing.T, client func(*Transport), server func(
|
|||
go func(count int) {
|
||||
defer wg.Done()
|
||||
server(count, ct)
|
||||
sc.Close()
|
||||
}(count)
|
||||
return cc, nil
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче