Skip to content

Conversation

benjaminp
Copy link

Prioritize::send_data has a check to prevent assigning capacity to streams that are not yet open. Assigning flow control window to pending streams could starve already open streams.

This change adds a similar check to Prioritize::reserve_capacity.

Test capacity_not_assigned_to_unopened_streams in flow_control.rs demonstrates the fix.

A number of other tests must be changed because they were assuming that pending streams immediately received connection capacity.

This may be related to #853.

@benjaminp benjaminp force-pushed the no-capacity-for-unopened-streams branch 2 times, most recently from 9b330f4 to 34de0d6 Compare August 27, 2025 22:06
`Prioritize::send_data` has a check to prevent assigning capacity to streams that are not yet open. Assigning flow control window to pending streams could starve already open streams.

This change adds a similar check to `Prioritize::reserve_capacity`.

Test `capacity_not_assigned_to_unopened_streams` in `flow_control.rs` demonstrates the fix.

A number of other tests must be changed because they were assuming that pending streams immediately received connection capacity.

This may be related to hyperium#853.
@benjaminp benjaminp force-pushed the no-capacity-for-unopened-streams branch from 34de0d6 to 98d1c12 Compare August 27, 2025 22:16
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.

1 participant