Skip to content

Commit 15db365

Browse files
nhooyradg
authored andcommitted
net/http: http.Request.Context doc fix
The comment on http.Request.Context says that the context is canceled when the client's connection closes even though this has not been implemented. See #15927 Change-Id: I50b68638303dafd70f77f8f778e6caff102d3350 Reviewed-on: https://go-review.googlesource.com/23672 Reviewed-by: Andrew Gerrand <[email protected]>
1 parent 6a0fd18 commit 15db365

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net/http/request.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ type Request struct {
275275
//
276276
// For outgoing client requests, the context controls cancelation.
277277
//
278-
// For incoming server requests, the context is canceled when either
279-
// the client's connection closes, or when the ServeHTTP method
280-
// returns.
278+
// For incoming server requests, the context is canceled when the
279+
// ServeHTTP method returns. For its associated values, see
280+
// ServerContextKey and LocalAddrContextKey.
281281
func (r *Request) Context() context.Context {
282282
if r.ctx != nil {
283283
return r.ctx

0 commit comments

Comments
 (0)