Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a method to release all the long polling connections

  • Loading branch information...
commit ed623a2feaa52111b615c791223a1b95df11c98d 1 parent 5ee8231
@dpp dpp authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala
View
14 web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala
@@ -87,6 +87,8 @@ object LiftSession {
*/
var onEndServicing: List[(LiftSession, Req, Box[LiftResponse]) => Unit] = Nil
+
+
@volatile private var constructorCache: Map[(Class[_], Box[Class[_]]), Box[ConstructorType]] = Map()
private[http] def constructFrom[T](session: LiftSession, pp: Box[ParamPair], clz: Class[T]): Box[T] = {
@@ -211,6 +213,18 @@ object SessionMaster extends LiftActor with Loggable {
}
}
+
+ /**
+ * End comet long polling for all sessions. This allows a clean reload of Nginx
+ * because Nginx children stick around for long polling.
+ */
+ def breakOutAllComet() {
+ val ses = lockRead(sessions)
+ ses.valuesIterator.foreach {
+ _.session.breakOutComet()
+ }
+ }
+
def getSession(id: String, otherId: Box[String]): Box[LiftSession] = lockAndBump {
otherId.flatMap(sessions.get) or Box(sessions.get(id))
}
Please sign in to comment.
Something went wrong with that request. Please try again.