Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/http2: off-by-one in MaxConcurrentStreams check #48358

Closed
neild opened this issue Sep 13, 2021 · 1 comment
Closed

x/net/http2: off-by-one in MaxConcurrentStreams check #48358

neild opened this issue Sep 13, 2021 · 1 comment

Comments

@neild
Copy link
Contributor

neild commented Sep 13, 2021

The check to see if a ClientConn is at its stream limit has an off-by-one error (< instead of <=), limiting a conn to one fewer stream than the server-provided limit:
https://go.googlesource.com/net/+/refs/heads/master/http2/transport.go#797

There are actually two checks against this limit; the other one is correct:
https://go.googlesource.com/net/+/refs/heads/master/http2/transport.go#1203

@gopherbot
Copy link

Change https://golang.org/cl/349490 mentions this issue: http2: fix off-by-one error in client check for max concurrent streams

dteh pushed a commit to dteh/fhttp that referenced this issue Jun 22, 2022
Fixes golang/go#48358.

Change-Id: Ib4eb93702b32ae7d03cad17ca0b997d5e6a58ad7
Reviewed-on: https://go-review.googlesource.com/c/net/+/349490
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants