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

Ensure QuicStreamChannel.shutdownOutput() is only called once all pre… #276

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

normanmaurer
Copy link
Member

…vious writes were processed.

Motivation:
We need to ensure QuicStreamChannel.shutdownOutput() is only called once all previous writes were processed. This is necessary as otherwise shutdownOutput() might be called while some writes are still queued (due flowcontrol).

Modifications:

  • Always do the shutdownOutput() via a ChannelFutureListener
  • Adjust tests

Result:
Always drain write queue first before shutdown the output.

…vious writes were processed.

Motivation:
We need to ensure QuicStreamChannel.shutdownOutput() is only called once all previous writes were processed. This is necessary as otherwise shutdownOutput() might be called while some writes are still queued (due flowcontrol).

Modifications:
- Always do the shutdownOutput() via a ChannelFutureListener
- Adjust tests

Result:
Always drain write queue first before shutdown the output.
@normanmaurer
Copy link
Member Author

/cc @yawkat ...

@normanmaurer normanmaurer added this to the 0.0.24.Final milestone Jan 16, 2024
Copy link
Contributor

@yawkat yawkat left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM. Man, this method control flow is so complicated.

@normanmaurer
Copy link
Member Author

normanmaurer commented Jan 16, 2024

Otherwise LGTM. Man, this method control flow is so complicated.

I agree... Once this is fixed I will see if I can simplify it

@normanmaurer normanmaurer requested a review from yawkat January 16, 2024 09:21
@normanmaurer normanmaurer merged commit 17fa613 into main Jan 16, 2024
5 checks passed
@normanmaurer normanmaurer deleted the shutdown_fix branch January 16, 2024 13:36
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.

2 participants