Merge pull request #1457 from akka/wip-3345-not-closing-testconductor-on-netty-thread-√

#3345 - making sure not to close the Netty Bootstrap on the Netty IO th...
This commit is contained in:
Viktor Klang (√) 2013-05-20 12:18:53 -07:00
commit b62d5c8e84
2 changed files with 3 additions and 4 deletions

View file

@ -317,7 +317,7 @@ private[akka] class PlayerHandler(
val channel = event.getChannel
log.debug("disconnected from {}", getAddrString(channel))
fsm ! PoisonPill
RemoteConnection.shutdown(channel)
executor.execute(new Runnable { def run = RemoteConnection.shutdown(channel) }) // Must be shutdown outside of the Netty IO pool
}
override def messageReceived(ctx: ChannelHandlerContext, event: MessageEvent) = {

View file

@ -71,7 +71,6 @@ private[akka] object RemoteConnection {
case _ "[unknown]"
}
def shutdown(channel: Channel) = {
channel.getFactory.releaseExternalResources()
}
def shutdown(channel: Channel) =
try channel.close() finally try channel.getFactory.shutdown() finally channel.getFactory.releaseExternalResources()
}