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

StatisticsHandler broken for async applications #5493

Closed
sbordet opened this issue Oct 22, 2020 · 2 comments
Closed

StatisticsHandler broken for async applications #5493

sbordet opened this issue Oct 22, 2020 · 2 comments
Assignees

Comments

@sbordet
Copy link
Contributor

sbordet commented Oct 22, 2020

Jetty version
10.0.x

Description
In Jetty 10, StatisticsHandler.handle() has a finally block where it flushes the response if _shutdown != null, which is always true (unless stopped).

This is bad because async applications get their response flushed (with all the headers) before they even get a chance to add headers.

@gregw
Copy link
Contributor

gregw commented Oct 26, 2020

The test should at least be: if (shutdown != null && shutdown.isShutdown()), but I don't understand why we need the flush buffer at all... nor how this current code is not failing some test or other?

lachlan-roberts added a commit that referenced this issue Oct 27, 2020
lachlan-roberts added a commit that referenced this issue Oct 28, 2020
…dler

Issue #5493 - Fix and simplify graceful shutdown of StatisticsHandler
@lachlan-roberts
Copy link
Contributor

Fixed with PR #5517.

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

No branches or pull requests

3 participants