Fix handling of SETTINGS_MAX_CONCURRENT_STREAMS.#1184
Merged
tatsuhiro-t merged 1 commit intonghttp2:masterfrom Jun 5, 2018
Merged
Fix handling of SETTINGS_MAX_CONCURRENT_STREAMS.#1184tatsuhiro-t merged 1 commit intonghttp2:masterfrom
tatsuhiro-t merged 1 commit intonghttp2:masterfrom
Conversation
The maximum number of outgoing concurrent streams is initially limited to 100 to avoid issues when the local endpoint submits lots of requests before receiving initial SETTINGS frame from the remote endpoint, since sending them at once to the remote endpoint could lead to rejection of some of the requests. This initial limit is overwritten with the value advertised in SETTINGS_MAX_CONCURRENT_STREAMS setting by the remote endpoint, but previously, it wasn't lifted if the remote endpoint didn't advertise that setting (implying no limits), in which case the limit of 100 was retained, even though it was never advertised by the remote endpoint. Signed-off-by: Piotr Sikora <[email protected]>
tatsuhiro-t
reviewed
Jun 3, 2018
| session->remote_settings.max_concurrent_streams = | ||
| NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS; | ||
| session->remote_settings_received = 1; | ||
| } |
Member
There was a problem hiding this comment.
I'm wondering setting max_concurrent_streams to max somewhere near
Line 5421 in bfd4d8b
Member
There was a problem hiding this comment.
My suggestion doesn't work when we see the some part of SETTINGS and before calling nghttp2_session_send. I think your original PR looks good to me.
Contributor
Author
There was a problem hiding this comment.
Yeah, I think that removing initial limit in NGHTTP2_IB_READ_FIRST_SETTINGS could open the floodgates in case of partial read of the SETTINGS frame from a peer that advertises SETTINGS_MAX_CONCURRENT_STREAMS.
Thanks for investigating!
tatsuhiro-t
approved these changes
Jun 4, 2018
Member
|
Thank you for PR. Merged now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The maximum number of outgoing concurrent streams is initially
limited to 100 to avoid issues when the local endpoint submits
lots of requests before receiving initial SETTINGS frame from
the remote endpoint, since sending them at once to the remote
endpoint could lead to rejection of some of the requests.
This initial limit is overwritten with the value advertised in
SETTINGS_MAX_CONCURRENT_STREAMS setting by the remote endpoint,
but previously, it wasn't lifted if the remote endpoint didn't
advertise that setting (implying no limits), in which case the
limit of 100 was retained, even though it was never advertised
by the remote endpoint.