mirror of
https://github.com/golang/go
synced 2024-10-02 02:18:33 -06:00
net/http: fix benchmark goroutine leak
New detection because of net/http now using TestMain. Fixes #9033 LGTM=iant R=golang-codereviews, iant CC=adg, golang-codereviews, rsc https://golang.org/cl/170210043
This commit is contained in:
parent
1340c6d593
commit
cf105e2fa0
@ -2819,6 +2819,7 @@ func benchmarkClientServerParallel(b *testing.B, parallelism int, useTLS bool) {
|
||||
InsecureSkipVerify: true,
|
||||
},
|
||||
}
|
||||
defer noVerifyTransport.CloseIdleConnections()
|
||||
client := &Client{Transport: noVerifyTransport}
|
||||
for pb.Next() {
|
||||
res, err := client.Get(ts.URL)
|
||||
|
Loading…
Reference in New Issue
Block a user