]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: remove TODO about the Server's base context
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 30 Sep 2016 02:35:43 +0000 (19:35 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 30 Sep 2016 03:57:24 +0000 (03:57 +0000)
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>
src/net/http/server.go

index 89574a8b36e7e9300df967816621f2b59b35da0f..ef69fbab54d46981ff2f17adee4e05a3e5401f51 100644 (file)
@@ -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 {