Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closes #1140 Added onListenersListEmptied() to ListenerManager to be …

…able to react when listerners-list is emptied
  • Loading branch information...
commit ddf1cb844898181341ecb2d7b5050a8cdfae5a6f 1 parent 32fc95b
@andreak andreak authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 web/webkit/src/main/scala/net/liftweb/http/CometActor.scala
View
10 web/webkit/src/main/scala/net/liftweb/http/CometActor.scala
@@ -247,9 +247,19 @@ trait ListenerManager {
case RemoveAListener(who) =>
listeners = listeners.filter(_._1 ne who)
+ if (listeners.isEmpty) {
+ onListenersListEmptied()
+ }
}
/**
+ * Called after RemoveAListener-message is processed and no more listeners exist.
+ * Default does nothing.
+ */
+ protected def onListenersListEmptied() {
+ }
+
+ /**
* Update the listeners with the message generated by createUpdate
*/
protected def updateListeners() {
Please sign in to comment.
Something went wrong with that request. Please try again.