aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-01-13 19:36:51 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-01-13 22:11:37 +0000
commitaba6250250d0cdcd1b7a19ca9c6112639eccbb5e (patch)
tree09411ec53428129f181b6b4e00a2e86ab02cbfcd
parent66a7097ca9283bd98fd3fbb507634e444081d215 (diff)
downloadgo-aba6250250d0cdcd1b7a19ca9c6112639eccbb5e.tar.gz
go-aba6250250d0cdcd1b7a19ca9c6112639eccbb5e.zip
net/http: clarify ConnState StateActive docs for HTTP/2
Update #13925 Change-Id: I7cd0625fad841eb0e3f364629f9bc225aa2fdce9 Reviewed-on: https://go-review.googlesource.com/18575 Reviewed-by: Andrew Gerrand <adg@golang.org>
-rw-r--r--src/net/http/server.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go
index bbaf5d2cc6..8d50ffc599 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -2016,6 +2016,11 @@ const (
// and doesn't fire again until the request has been
// handled. After the request is handled, the state
// transitions to StateClosed, StateHijacked, or StateIdle.
+ // For HTTP/2, StateActive fires on the transition from zero
+ // to one active request, and only transitions away once all
+ // active requests are complete. That means that ConnState
+ // can not be used to do per-request work; ConnState only notes
+ // the overall state of the connection.
StateActive
// StateIdle represents a connection that has finished