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

Render async timeouts in the listener, as Jetty 9 requires #221

Merged
merged 1 commit into from Jul 3, 2023

Conversation

rossabaker
Copy link
Member

@rossabaker rossabaker commented Jun 30, 2023

Should fix the issue in http4s/http4s-jetty#118.

The problem here is that we need to call complete() on the same thread that receives the onTimeout() (see jetty/jetty.project#6227). Instead of racing a timeout response against the service response and rendering the winner, we race a unit callback against the service response, and render the timeout response using the Servlet API. We only call context.complete() wherever we actually render the response.

@rossabaker
Copy link
Member Author

Reviews welcome, but I'm going to do a release candidate so we can test this on the open Jetty PR.

@rossabaker rossabaker merged commit ed12c64 into series/0.23 Jul 3, 2023
32 checks passed
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.

None yet

1 participant