Fixed #375 "Global.onStop() is not called"#249
Merged
Conversation
Contributor
There was a problem hiding this comment.
Why not the following?
val server = new NettyServer(…)
Runtime.getRuntime.addShutdownHook(new Thread {
override def run() {
server.stop()
}
})
Some(server)
Contributor
Author
There was a problem hiding this comment.
Your suggestion looks better, so I just changed the code.
Contributor
There was a problem hiding this comment.
Cool :)
You just forgot the parenthesis after run, but that’s not so important…
Can you squash your commits into a single one?
Contributor
Author
There was a problem hiding this comment.
Thanks for the help.
The 2 commits were squashed.
When it comes to the parenthesis, I just followed the style just few lines above, at line 165, in the same file. :)
I have been using play frameworks for a year and love it. And I am happy to contribute to them :)
|
Can you please sign our CLA? http://www.typesafe.com/contribute/cla Thanks |
Contributor
Author
|
I just did sign the CLA. Thanks. |
pk11
pushed a commit
that referenced
this pull request
May 2, 2012
Fixed #375 "Global.onStop() is not called"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed #375 ticket
https://play.lighthouseapp.com/projects/82401-play-20/tickets/375-globalonstop-is-not-invoked
If the application is started by 'play start' command, Global.onStop() is not called.
So I attached a hooker.
Please review it.