Skip to content

Commit

Permalink
Fix #315 Update Glokka from 1.4 to 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocdaothanh committed Mar 6, 2014
1 parent b375e48 commit adfb884
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Expand Up @@ -7,7 +7,7 @@
* `#318 <https://github.com/ngocdaothanh/xitrum/issues/318>`_
Fix Netty memory leak at xitrum.util.UrlSafeBase64
* `#315 <https://github.com/ngocdaothanh/xitrum/issues/315>`_
Update Glokka from 1.4 to 1.5
Update Glokka from 1.4 to 1.6

3.2:

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Expand Up @@ -31,7 +31,7 @@ libraryDependencies += "io.netty" % "netty-all" % "4.0.17.Final"
libraryDependencies += "org.javassist" % "javassist" % "3.18.1-GA"

// For clustering SockJS; Akka is included here
libraryDependencies += "tv.cntt" %% "glokka" % "1.5"
libraryDependencies += "tv.cntt" %% "glokka" % "1.6"

// Redirect Akka log to SLF4J
libraryDependencies += "com.typesafe.akka" %% "akka-slf4j" % "2.2.4"
Expand Down
13 changes: 7 additions & 6 deletions src/main/scala/xitrum/sockjs/NonWebSocketSession.scala
Expand Up @@ -113,23 +113,24 @@ class NonWebSocketSession(var receiverCliento: Option[ActorRef], pathPrefix: Str
unwatchAndStop()

case SubscribeFromReceiverClient =>
val s = sender()
if (closed) {
sender ! SubscribeResultToReceiverClientClosed
s ! SubscribeResultToReceiverClientClosed
} else {
lastSubscribedAt = System.currentTimeMillis()
if (receiverCliento.isEmpty) {
receiverCliento = Some(sender)
context.watch(sender)
receiverCliento = Some(s)
context.watch(s)
context.setReceiveTimeout(SockJsAction.TIMEOUT_HEARTBEAT)

if (bufferForClientSubscriber.isEmpty) {
sender ! SubscribeResultToReceiverClientWaitForMessage
s ! SubscribeResultToReceiverClientWaitForMessage
} else {
sender ! SubscribeResultToReceiverClientMessages(bufferForClientSubscriber.toList)
s ! SubscribeResultToReceiverClientMessages(bufferForClientSubscriber.toList)
bufferForClientSubscriber.clear()
}
} else {
sender ! SubscribeResultToReceiverClientAnotherConnectionStillOpen
s ! SubscribeResultToReceiverClientAnotherConnectionStillOpen
}
}

Expand Down

0 comments on commit adfb884

Please sign in to comment.