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

graceful shutdown: distinguish between stopped and conn closed #1220

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Oct 19, 2023

Follow-up on #1218

Basically, I missed that we must ensure that the stream is not polled after Poll::Ready(None) which can happen
if the stream is closed but since Receive::Shutdown was mapped to Shutdown::Stopped where the connection could already have been closed and thus the stream had already return Poll::Ready(None)

@niklasad1 niklasad1 requested a review from a team as a code owner October 19, 2023 10:46
Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

I think I follow; I wonder whether fuse()-ing the stream is a safe way to ensure it won't be polled again or whatever, rather than any extra types, but code looks good to me!

@niklasad1 niklasad1 merged commit 600d41f into master Oct 19, 2023
14 of 15 checks passed
@niklasad1 niklasad1 deleted the na-graceful-shutdown-stopped-conn-closed branch October 19, 2023 13:24
niklasad1 added a commit that referenced this pull request Oct 24, 2023
* graceful shutdown: distinguish between stopped and conn closed

* grumbles: ws_stream fuse
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.

3 participants