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

HTTP2: Ensure we flush when a window limit is hit #52797

Merged
merged 1 commit into from
May 21, 2021

Conversation

geoffkizer
Copy link
Contributor

Fixes #52451

When writing a request body, we need to ensure we flush if we hit a window limit (connection or stream) because we don't know when we will be able to write further data, since it depends on receiving a window update from the peer.

Also, minor related test cleanup.

@ghost
Copy link

ghost commented May 15, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #52451

When writing a request body, we need to ensure we flush if we hit a window limit (connection or stream) because we don't know when we will be able to write further data, since it depends on receiving a window update from the peer.

Also, minor related test cleanup.

Author: geoffkizer
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@geoffkizer
Copy link
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@geoffkizer
Copy link
Contributor Author

@dotnet/ncl can I get a review?

Copy link
Member

@ManickaP ManickaP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +1468 to +1472
bool flush = false;
if (finalFlush && remaining.Length == 0)
{
flush = true;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
bool flush = false;
if (finalFlush && remaining.Length == 0)
{
flush = true;
}
bool flush = finalFlush && remaining.Length;

@geoffkizer geoffkizer merged commit e85b9f9 into dotnet:main May 21, 2021
@geoffkizer geoffkizer deleted the http2flushonwindowlimit branch May 21, 2021 21:25
Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the one pending nit, LGTM.

@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpClient Http/2 doesn't flush frames when hitting the window limit
6 participants