Commit 8bc30e07 authored by Dmitry Vyukov's avatar Dmitry Vyukov

net/http: fix goroutine leak in benchmark

Race builders report goroutine leaks after addition of this benchmark:
http://build.golang.org/log/18e47f4cbc18ee8db125e1f1157573dd1e333c41
Close idle connection in default transport.

Change-Id: I86ff7b2e0972ed47c5ebcb9fce19e7f39d3ff530
Reviewed-on: https://go-review.googlesource.com/3412Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 67f8a813
......@@ -2977,6 +2977,7 @@ func BenchmarkClient(b *testing.B) {
case <-time.After(5 * time.Second):
b.Fatalf("subprocess did not stop")
}
DefaultTransport.(*Transport).CloseIdleConnections()
}
func BenchmarkServerFakeConnNoKeepAlive(b *testing.B) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment