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 5ffd591 commit acb083aCopy full SHA for acb083a
src/net/http/server.go
@@ -2893,16 +2893,17 @@ func (srv *Server) Serve(l net.Listener) error {
2893
}
2894
return e
2895
2896
+ connCtx := ctx
2897
if cc := srv.ConnContext; cc != nil {
- ctx = cc(ctx, rw)
2898
- if ctx == nil {
+ connCtx = cc(connCtx, rw)
2899
+ if connCtx == nil {
2900
panic("ConnContext returned nil")
2901
2902
2903
tempDelay = 0
2904
c := srv.newConn(rw)
2905
c.setState(c.rwc, StateNew) // before Serve can return
- go c.serve(ctx)
2906
+ go c.serve(connCtx)
2907
2908
2909
0 commit comments