Can't close a Netty Client
Jonathan Arnold
jdarnold at buddydog.org
Thu Jul 21 11:28:13 EDT 2011
On Wed, 20 Jul 2011 01:42:51 -0700 (PDT)
"B.L. Zeebub" <roger.varley at googlemail.com> wrote:
> Hi
>
> Below is the code which starts my NettyClient. The class
> NettyClientService is created and started by an external application.
> When the external application terminates, it calls
> NettyClientService.shutdown() which hangs.
>
> As the code is written, it's hanging on the
> channel.close().awaitUninterruptibly(). If I change that to simple
> channel.close(), then the class hangs on
> bootstrap.releaseExternalResources();
>
> Any suggestions on what's wrong, or on how I can further diagnose the
> problem?
Oddly enough, I'm having the same problem. Basically, it's looping in
the 'terminate' static routine in ExecutorUtil.java. It calls
shutdownNow and waits 100msec for it to finish. If it doesn't, it just
tries it again.
So for some reason the ExecutorService isn't shutting down and it just
loops forever. I suppose we need to figure out why it isn't shutting
down, but even then, I don't think it should loop forever waiting for
shutdown to work. Maybe just loop a few times, then just kill it?
--
Jonathan Arnold Webstream: http://hieronymus.soup.io
Talent wins games, but team work and intelligence wins championships.
Michael Jordan
More information about the netty-users
mailing list