Skip to content

Commit 214bf68

Browse files
committed
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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent dd748cf commit 214bf68

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/net/http/server.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,9 +2264,7 @@ func (srv *Server) Serve(l net.Listener) error {
22642264
return err
22652265
}
22662266

2267-
// TODO: allow changing base context? can't imagine concrete
2268-
// use cases yet.
2269-
baseCtx := context.Background()
2267+
baseCtx := context.Background() // base is always background, per Issue 16220
22702268
ctx := context.WithValue(baseCtx, ServerContextKey, srv)
22712269
ctx = context.WithValue(ctx, LocalAddrContextKey, l.Addr())
22722270
for {

0 commit comments

Comments
 (0)