x/net/http2: half-closed streams not counted against client stream limit #48564
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
(*clientConnReadLoop).processData
removes a stream from theClientConn.streams
map when receiving aDATA
frame with theEND_STREAM
flag set:https://go.googlesource.com/net/+/978cfadd31cf6299758dbb5165d451ce91989f1a/http2/transport.go#2306
Removing the stream from the map opens up a new slot for a stream, since
ClientConn
considerslen(cc.streams)
to be the number of streams counting against the connection stream limit:https://go.googlesource.com/net/+/978cfadd31cf6299758dbb5165d451ce91989f1a/http2/transport.go#1257
However, the stream may be in the half-closed state at this time. A stream only becomes fully closed once both sides send an
END_STREAM
flag or at least one side sends aRST_STREAM
frame. RFC 7540, 5.1.2 states that half-closed streams count against the stream limit.The client should instead continue to count the stream against the limit until it has been closed on both sides.
The text was updated successfully, but these errors were encountered: