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

Issue #4537 - fix potential spin when discarding in WebSocketConnection #4555

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

lachlan-roberts
Copy link
Contributor

Signed-off-by: Lachlan Roberts [email protected]

#4537

@lachlan-roberts lachlan-roberts force-pushed the jetty-9.4.x-4537-WebSocketSpin branch from 418aa0c to 20621b7 Compare February 10, 2020 07:30
@lachlan-roberts lachlan-roberts requested review from joakime and removed request for gregw February 10, 2020 22:38
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

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

Can we replicate this in a unit test?

@lachlan-roberts
Copy link
Contributor Author

@joakime I managed to replicate the spin by changing some methods and fields to public but it proved extremely difficult to reproduce in a unit test. Triggering the spin is hard enough and then you need to detect that one thread is still spinning even though onClose has been called. We would need to find out which thread is the one spinning, wait for a while, and check that it has been returned to the ThreadPool.

Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

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

Merge it!

@lachlan-roberts lachlan-roberts merged commit aaf6f17 into jetty-9.4.x Feb 12, 2020
@lachlan-roberts lachlan-roberts deleted the jetty-9.4.x-4537-WebSocketSpin branch February 12, 2020 22:14
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