Skip to content

Commit aba6250

Browse files
committed
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 <[email protected]>
1 parent 66a7097 commit aba6250

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net/http/server.go

+5
Original file line numberDiff line numberDiff line change
@@ -2016,6 +2016,11 @@ const (
20162016
// and doesn't fire again until the request has been
20172017
// handled. After the request is handled, the state
20182018
// transitions to StateClosed, StateHijacked, or StateIdle.
2019+
// For HTTP/2, StateActive fires on the transition from zero
2020+
// to one active request, and only transitions away once all
2021+
// active requests are complete. That means that ConnState
2022+
// can not be used to do per-request work; ConnState only notes
2023+
// the overall state of the connection.
20192024
StateActive
20202025

20212026
// StateIdle represents a connection that has finished

0 commit comments

Comments
 (0)