diff options
Diffstat (limited to 'src/net/http/export_test.go')
| -rw-r--r-- | src/net/http/export_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/http/export_test.go b/src/net/http/export_test.go index e0ae49afa7..4ccce08b43 100644 --- a/src/net/http/export_test.go +++ b/src/net/http/export_test.go @@ -58,10 +58,11 @@ func SetPendingDialHooks(before, after func()) { func SetTestHookServerServe(fn func(*Server, net.Listener)) { testHookServerServe = fn } func NewTestTimeoutHandler(handler Handler, ch <-chan time.Time) Handler { - f := func() <-chan time.Time { - return ch + return &timeoutHandler{ + handler: handler, + timeout: func() <-chan time.Time { return ch }, + // (no body and nil cancelTimer) } - return &timeoutHandler{handler, f, ""} } func ResetCachedEnvironment() { |
