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

fix: busy loop on shutdown #834

Merged
merged 1 commit into from
Jan 20, 2025
Merged

fix: busy loop on shutdown #834

merged 1 commit into from
Jan 20, 2025

Conversation

seanmonstar
Copy link
Member

When in a slow shutdown, this was busy looping since no more streams were left. The change here now only makes sure we poll one extra time if the state changed during the poll.

Fixes #831

@seanmonstar
Copy link
Member Author

cc @howardjohn since this previously was addressing a bug you noticed.

Copy link
Contributor

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

Thanks!

@seanmonstar seanmonstar merged commit 8dc26ad into master Jan 20, 2025
6 checks passed
@seanmonstar seanmonstar deleted the shutdown-busy-loop branch January 20, 2025 21:57
GlenDC added a commit to plabayo/rama that referenced this pull request Feb 20, 2025
* Fix reclaiming reserved capacity (fixes <hyperium/h2#607>)
  by @nox in <hyperium/h2#832>
* Fix busy loop on shutdown by @seanmonstar
  in <hyperium/h2#834>
* Fix window size decrement of send-closed streams
  by @nox in <hyperium/h2#830>
* Fix handle implicit resets at the right time
  by @nox in <hyperium/h2#833>
* Fix poll_flush after poll_shutdown
  by @bdbai in <hyperium/h2#836>

Co-authored-by: Sean McArthur <sean@seanmonstar.com>
Co-authored-by: 包布丁 <htbai1998m@hotmail.com>
Co-authored-by: Anthony Ramine <123095+nox@users.noreply.github.com>
Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
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.

poll_shutdown is called in a busy loop when returning Poll::Pending
2 participants