We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bbfc51 commit 827fb3fCopy full SHA for 827fb3f
src/net/http/server.go
@@ -2920,16 +2920,17 @@ func (srv *Server) Serve(l net.Listener) error {
2920
}
2921
return err
2922
2923
+ connCtx := ctx
2924
if cc := srv.ConnContext; cc != nil {
- ctx = cc(ctx, rw)
2925
- if ctx == nil {
+ connCtx = cc(connCtx, rw)
2926
+ if connCtx == nil {
2927
panic("ConnContext returned nil")
2928
2929
2930
tempDelay = 0
2931
c := srv.newConn(rw)
2932
c.setState(c.rwc, StateNew) // before Serve can return
- go c.serve(ctx)
2933
+ go c.serve(connCtx)
2934
2935
2936
0 commit comments