diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-10-30 03:28:05 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-01 04:42:33 +0000 |
| commit | 53fc330e2d154443acf3d01e0d68bae22b2b7804 (patch) | |
| tree | 477913b22ca391d8af6a4092a6e7aa19d9896b78 /src/net/http/export_test.go | |
| parent | 2d4d22af7e8482054a6f802ec798f4af4d37596f (diff) | |
| download | go-53fc330e2d154443acf3d01e0d68bae22b2b7804.tar.xz | |
net/http: add Server.Close & Server.Shutdown for forced & graceful shutdown
Also updates x/net/http2 to git rev 541150 for:
http2: add support for graceful shutdown of Server
https://golang.org/cl/32412
http2: make http2.Server access http1's Server via an interface check
https://golang.org/cl/32417
Fixes #4674
Fixes #9478
Change-Id: I8021a18dee0ef2fe3946ac1776d2b10d3d429052
Reviewed-on: https://go-review.googlesource.com/32329
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/http/export_test.go')
| -rw-r--r-- | src/net/http/export_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/http/export_test.go b/src/net/http/export_test.go index 00824e754c..fbed45070c 100644 --- a/src/net/http/export_test.go +++ b/src/net/http/export_test.go @@ -87,6 +87,12 @@ func (t *Transport) IdleConnKeysForTesting() (keys []string) { return } +func (t *Transport) IdleConnKeyCountForTesting() int { + t.idleMu.Lock() + defer t.idleMu.Unlock() + return len(t.idleConn) +} + func (t *Transport) IdleConnStrsForTesting() []string { var ret []string t.idleMu.Lock() |
