]> Cypherpunks repositories - gostls13.git/commit
net/http: add Transport.MaxIdleConns limit
authorBrad Fitzpatrick <bradfitz@golang.org>
Sat, 30 Apr 2016 22:17:26 +0000 (17:17 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 1 May 2016 00:12:20 +0000 (00:12 +0000)
commit81b2ea4d34a42bee14e1ed17d5166546be957849
tree37d1a0b69a3851220430097b02c65c520421e418
parent38cfaa5f0ac1e8b9c7528649f01e4b0edcd4a788
net/http: add Transport.MaxIdleConns limit

The HTTP client had a limit for the maximum number of idle connections
per-host, but not a global limit.

This CLs adds a global idle connection limit too,
Transport.MaxIdleConns.

All idle conns are now also stored in a doubly-linked list. When there
are too many, the oldest one is closed.

Fixes #15461

Change-Id: I72abbc28d140c73cf50f278fa70088b45ae0deef
Reviewed-on: https://go-review.googlesource.com/22655
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/go/build/deps_test.go
src/net/http/export_test.go
src/net/http/transport.go
src/net/http/transport_test.go