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 web containers are stopped after close #8227

Closed
wants to merge 1 commit into from

Conversation

mkw
Copy link
Contributor

@mkw mkw commented Feb 7, 2017

Closes #8224

In fixing #8036, commit 0af53b3 was a bit over-zealous in preventing double-execution and prevented initialization done on object creation from being cleaned up for Tomcat and Jetty. Undertow avoids the problem because it does not share similar initialization on creation. This pull request removes the started check on stop() for Jetty and Tomcat because re-invoking stop() is safe, regardless, and stop() must execute to shutdown threads started on creation. It also adds a test to prove that stopping without start is safe and that the servers are correctly stopped, even if not previously started.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 7, 2017
@philwebb philwebb added priority: high type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 2, 2017
@philwebb philwebb added this to the 1.4.5 milestone Mar 2, 2017
philwebb added a commit that referenced this pull request Mar 2, 2017
philwebb added a commit that referenced this pull request Mar 2, 2017
Update counter logic to prevent negative values. Since the stop method
can now be called more than once, it was possible for the counter to
move into negative values.

See gh-8227
philwebb added a commit that referenced this pull request Mar 2, 2017
* pr/8227:
  Refine engine counter logic
  Polish web containers stop contribution
  Ensure web containers are stopped after close
@philwebb philwebb closed this in 757aa64 Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web containers are not fully closed on context close in 1.4.4.RELEASE and later, preventing termination
3 participants