Fixed #375 "Global.onStop() is not called" #249

Merged
merged 1 commit into from May 2, 2012

Conversation

Projects
None yet
3 participants
@Seyun
Contributor

Seyun commented Apr 20, 2012

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.

@julienrf

View changes

framework/src/play/src/main/scala/play/core/server/NettyServer.scala
+ }
+ })
+
+ server
} catch {

This comment has been minimized.

@julienrf

julienrf Apr 20, 2012

Contributor

Why not the following?

val server = new NettyServer(…)
Runtime.getRuntime.addShutdownHook(new Thread {
  override def run() {
    server.stop()
  }
})
Some(server)
@julienrf

julienrf Apr 20, 2012

Contributor

Why not the following?

val server = new NettyServer(…)
Runtime.getRuntime.addShutdownHook(new Thread {
  override def run() {
    server.stop()
  }
})
Some(server)

This comment has been minimized.

@Seyun

Seyun Apr 20, 2012

Contributor

Your suggestion looks better, so I just changed the code.

@Seyun

Seyun Apr 20, 2012

Contributor

Your suggestion looks better, so I just changed the code.

This comment has been minimized.

@julienrf

julienrf Apr 20, 2012

Contributor

Cool :)
You just forgot the parenthesis after run, but that’s not so important…
Can you squash your commits into a single one?

@julienrf

julienrf Apr 20, 2012

Contributor

Cool :)
You just forgot the parenthesis after run, but that’s not so important…
Can you squash your commits into a single one?

This comment has been minimized.

@Seyun

Seyun Apr 20, 2012

Contributor

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 :)

@Seyun

Seyun Apr 20, 2012

Contributor

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 :)

@ghost ghost assigned pk11 Apr 30, 2012

@pk11

This comment has been minimized.

Show comment
Hide comment
@pk11

pk11 Apr 30, 2012

Collaborator

Can you please sign our CLA? http://www.typesafe.com/contribute/cla Thanks

Collaborator

pk11 commented Apr 30, 2012

Can you please sign our CLA? http://www.typesafe.com/contribute/cla Thanks

@Seyun

This comment has been minimized.

Show comment
Hide comment
@Seyun

Seyun May 1, 2012

Contributor

I just did sign the CLA.

Thanks.

Contributor

Seyun commented May 1, 2012

I just did sign the CLA.

Thanks.

pk11 added a commit that referenced this pull request May 2, 2012

Merge pull request #249 from Seyun/master
Fixed #375 "Global.onStop() is not called"

@pk11 pk11 merged commit 4bdb227 into playframework:master May 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment