mirror of
https://github.com/golang/go
synced 2024-11-05 15:06:09 -07:00
net/http: remove TODO about the Server's base context
I decided not to expand the API for this per discusion on #16220. Fixes #16220 Change-Id: I65cb2eacd4ec28c79438a8f7c30024524a484ce6 Reviewed-on: https://go-review.googlesource.com/30082 Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
dd748cf314
commit
214bf68097
@ -2264,9 +2264,7 @@ func (srv *Server) Serve(l net.Listener) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: allow changing base context? can't imagine concrete
|
||||
// use cases yet.
|
||||
baseCtx := context.Background()
|
||||
baseCtx := context.Background() // base is always background, per Issue 16220
|
||||
ctx := context.WithValue(baseCtx, ServerContextKey, srv)
|
||||
ctx = context.WithValue(ctx, LocalAddrContextKey, l.Addr())
|
||||
for {
|
||||
|
Loading…
Reference in New Issue
Block a user