Permalink
Browse files

Shut down LAPinger on servlet shutdown

  • Loading branch information...
dpp committed Aug 26, 2011
1 parent b03d34b commit 547f0445f32752dea3059fa214990be1fd0ae3e3
@@ -88,7 +88,7 @@ sealed trait Schedule extends Loggable {
/**
* Shut down the underlying <code>SingleThreadScheduledExecutor</code>
*/
- def shutdown: Unit = synchronized {
+ def shutdown(): Unit = synchronized {
service.shutdown
pool.shutdown
}
@@ -60,6 +60,10 @@ class LiftServlet extends Loggable {
LAScheduler.shutdown()
}
+ tryo {
+ LAPinger.shutdown
+ }
+
LiftRules.runUnloadHooks()
logger.debug("Destroyed Lift handler.")
// super.destroy
@@ -1559,7 +1559,8 @@ class LiftSession(private[http] val _contextPath: String, val uniqueId: String,
// deal with a stateless request when a snippet has
// different behavior in stateless mode
case Full(inst: StatelessBehavior) if !stateful_? =>
- inst.behavior(method)(kids)
+ if (inst.behaviorDispatch.isDefinedAt(method))
+ inst.behaviorDispatch(method)(kids) else NodeSeq.Empty
case Full(inst: StatefulSnippet) if !stateful_? =>
reportSnippetError(page, snippetName,

0 comments on commit 547f044

Please sign in to comment.