Removed if statement because it looked ugly

This commit is contained in:
Viktor Klang 2010-12-29 18:22:36 +01:00
parent 960e161659
commit 4994b13fd5

View file

@ -83,9 +83,7 @@ trait NettyRemoteClientModule extends RemoteClientModule { self: ListenerManagem
def shutdownClientConnection(address: InetSocketAddress): Boolean = synchronized {
remoteClients.remove(makeKey(address)) match {
case Some(client) =>
client.shutdown
true
case Some(client) => client.shutdown
case None => false
}
}
@ -133,9 +131,9 @@ trait NettyRemoteClientModule extends RemoteClientModule { self: ListenerManagem
}
object RemoteClient {
val SECURE_COOKIE: Option[String] = {
val cookie = config.getString("akka.remote.secure-cookie", "")
if (cookie == "") None else Some(cookie)
val SECURE_COOKIE: Option[String] = config.getString("akka.remote.secure-cookie", "") match {
case "" => None
case cookie => Some(cookie)
}
val READ_TIMEOUT = Duration(config.getInt("akka.remote.client.read-timeout", 1), TIME_UNIT)