Fixed ugly logging in NettyRemoteSupport (plus misc minor formatting).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
This commit is contained in:
parent
3088201bb8
commit
6db989ffa3
1 changed files with 6 additions and 2 deletions
|
|
@ -157,7 +157,10 @@ class NettyRemoteTransport(val remoteSettings: RemoteSettings, val system: Actor
|
|||
def unbindClient(remoteAddress: Address): Unit = {
|
||||
clientsLock.writeLock().lock()
|
||||
try {
|
||||
remoteClients.foreach { case (k, v) ⇒ if (v.isBoundTo(remoteAddress)) { v.shutdown(); remoteClients.remove(k) } }
|
||||
remoteClients foreach {
|
||||
case (k, v) ⇒
|
||||
if (v.isBoundTo(remoteAddress)) { v.shutdown(); remoteClients.remove(k) }
|
||||
}
|
||||
} finally {
|
||||
clientsLock.writeLock().unlock()
|
||||
}
|
||||
|
|
@ -227,7 +230,8 @@ class DefaultDisposableChannelGroup(name: String) extends DefaultChannelGroup(na
|
|||
override def close(): ChannelGroupFuture = {
|
||||
guard.writeLock().lock()
|
||||
try {
|
||||
if (open.getAndSet(false)) super.close() else throw new IllegalStateException("ChannelGroup already closed, cannot add new channel")
|
||||
if (open.getAndSet(false)) super.close()
|
||||
else throw new IllegalStateException("ChannelGroup already closed, cannot add new channel")
|
||||
} finally {
|
||||
guard.writeLock().unlock()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue