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

Fixes #9183 - ConnectHandler may close the connection instead of send… #9184

Merged

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Jan 17, 2023

…ing 200 OK.

Delaying the call to UpstreamConnection.fillInterested() until the 200 OK response has been sent.

Signed-off-by: Simone Bordet simone.bordet@gmail.com

…ing 200 OK.

Delaying the call to UpstreamConnection.fillInterested() until the 200 OK response has been sent.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet requested a review from gregw January 17, 2023 19:24
@sbordet sbordet added the Sponsored This issue affects a user with a commercial support agreement label Jan 17, 2023
gregw
gregw previously approved these changes Jan 18, 2023
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

OK other than a niggle

{
private final Runnable onComplete;

private OnCompleteListener(Runnable onComplete)
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels needlessly generic? Why not just make the UpstreamConnection implement AsyncListener, then it can just call fillInterest in onComplete?

@electrum
Copy link

electrum commented Jan 18, 2023

I tested this with airlift/airlift#1032 (using 2cdd9e26) running the test 100 times, all passed. Without this, there were 31 failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet merged commit 7fd6266 into jetty-10.0.x Jan 19, 2023
@sbordet sbordet deleted the fix/jetty-10-9183-connecthandler-immediate-server-close branch January 19, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsored This issue affects a user with a commercial support agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConnectHandler may close the connection instead of sending 200 OK
3 participants