We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a158d28 commit 3c859a7Copy full SHA for 3c859a7
http2/transport.go
@@ -864,8 +864,15 @@ func (cc *ClientConn) idleState() clientConnIdleState {
864
}
865
866
func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
867
- if cc.singleUse && cc.nextStreamID > 1 {
868
- return
+ if cc.singleUse {
+ // h2c requests stream id starts at 3
869
+ if cc.t.AllowHTTP && cc.nextStreamID > 3 {
870
+ return
871
+ }
872
+ // else it starts at 1
873
+ if !cc.t.AllowHTTP && cc.nextStreamID > 1 {
874
875
876
877
var maxConcurrentOkay bool
878
if cc.t.StrictMaxConcurrentStreams {
0 commit comments