Shutdown of Server Channel Factory

Thomas Bocek bocek at ifi.uzh.ch
Wed Sep 9 13:09:21 EDT 2009


Michael McGrady wrote:
> I am not getting a return from the NeoServerSocketChannelFactory's  
> releaseExternalResources method.  Is this something anyone else has  
> seen?  This is very surprising to me because this is just in essence a  
> return from the ExecutorUtil terminate method which just copies and  
> shuts down the copies as ExecutorServices shutdown method.  There  
> should be only a 100 millisecond wait in that method.

The awaitTermination() call may return false, so it will wait longer
than 100msec.

> Any ideas?

Make sure you have closed all connections before calling
releaseExternalResources. You can use the ChannelGroup to group channels
and close them with ChannelGroup.close().

Thomas


More information about the netty-users mailing list