Permalink
Browse files

Added in a shutdown hook for the BridgeActor in Lift

Thanks to iron9light for pointing this out.
  • Loading branch information...
1 parent c8e5e17 commit f62cd5f72da830bd4f39f737b9a6f4b7684e6a2b @dchenbecker dchenbecker committed Jun 28, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 derek-lift-demo/src/main/scala/code/comet/GameDisplay.scala
View
5 derek-lift-demo/src/main/scala/code/comet/GameDisplay.scala
@@ -22,6 +22,11 @@ class GameDisplay extends CometActor {
private val bridge = Actors.actorOf(classOf[BridgeActor]).start()
bridge ! this
+ // Make sure to stop our BridgeActor when we clean up Comet
+ override protected def localShutdown() {
+ bridge.stop()
+ }
+
/* A SessionVar represents a variable held by the
* servlet Session. It provides some nice wrapper functionality,
* including a default value and some transform/set operations.

0 comments on commit f62cd5f

Please sign in to comment.