Skip to content

Commit 84614ac

Browse files
committed
Set the base context for requests to the HammerContext
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 700b38a commit 84614ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/graceful/server_http.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
package graceful
66

77
import (
8+
"context"
89
"crypto/tls"
10+
"net"
911
"net/http"
1012
)
1113

@@ -16,6 +18,7 @@ func newHTTPServer(network, address, name string, handler http.Handler) (*Server
1618
WriteTimeout: DefaultWriteTimeOut,
1719
MaxHeaderBytes: DefaultMaxHeaderBytes,
1820
Handler: handler,
21+
BaseContext: func(net.Listener) context.Context { return GetManager().HammerContext() },
1922
}
2023
server.OnShutdown = func() {
2124
httpServer.SetKeepAlivesEnabled(false)

0 commit comments

Comments
 (0)