Skip to content

Always increment Stream Id on createStream#13485

Merged
normanmaurer merged 2 commits intonetty:4.1from
alecharmon:AlwaysIncrementStreamId-12065
Jul 19, 2023
Merged

Always increment Stream Id on createStream#13485
normanmaurer merged 2 commits intonetty:4.1from
alecharmon:AlwaysIncrementStreamId-12065

Conversation

@alecharmon
Copy link
Copy Markdown
Contributor

Motivation:

When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id.
ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error.

Modification:

Use a finally block so that we always increment the expected next stream id

Result:

Fixes #12065

@normanmaurer
Copy link
Copy Markdown
Member

@alecharmon did you sign our ical yet ? https://netty.io/s/icla

@alecharmon
Copy link
Copy Markdown
Contributor Author

@normanmaurer I did

@normanmaurer normanmaurer added this to the 4.1.95.Final milestone Jul 12, 2023
@normanmaurer
Copy link
Copy Markdown
Member

/cc @ejona86

@normanmaurer
Copy link
Copy Markdown
Member

Also @vietj and @idelpivnitskiy

@alecharmon alecharmon force-pushed the AlwaysIncrementStreamId-12065 branch from 9dae3e3 to a5fc728 Compare July 13, 2023 14:49
Motivation:

When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id.
ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error.

Modification:

Use a finally block so that we always increment the expected next stream id

Result:

Fixes netty#12065
@alecharmon alecharmon force-pushed the AlwaysIncrementStreamId-12065 branch from a5fc728 to 2269e9a Compare July 18, 2023 13:59
@normanmaurer normanmaurer merged commit 4e1a0c3 into netty:4.1 Jul 19, 2023
@normanmaurer
Copy link
Copy Markdown
Member

@alecharmon thanks a lot!

normanmaurer added a commit that referenced this pull request Jul 19, 2023
Motivation:

When the creation of a stream causes an error for whatever reason we
want to increment the next expected stream id.
ie: checkNewStreamAllowed raises an error which causes the headers frame
to get rejected subsequently a data frame arrives and it throws a
protocol error.

Modification:

Use a finally block so that we always increment the expected next stream
id

Result:

Fixes #12065

---------

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
normanmaurer added a commit that referenced this pull request Jul 27, 2023
…ug which caused sending multiple RST frames for the same id

Motivation:

This reverts commit 4e1a0c3 as it seems to cause a race in some situations. More investigation needs to be done but for now let's revert it.

Modification:

Revert commit 4e1a0c3

Result:

No more race which cause multiple RST frames to be send for the same stream id.
normanmaurer added a commit that referenced this pull request Jul 27, 2023
…ug which caused sending multiple RST frames for the same id

Motivation:

This reverts commit 4e1a0c3 as it seems to cause a race in some situations. More investigation needs to be done but for now let's revert it.

Modification:

Revert commit 4e1a0c3

Result:

No more race which cause multiple RST frames to be send for the same stream id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throwing protocol error when http2 max concurrent streams is exceeded instead of resStream

5 participants