Blocking with channelGroup.close with awaitUninterruptibly
Frederic Bregier
fredbregier at free.fr
Tue Dec 16 12:33:26 EST 2008
Hi Trustin,
I've got a short question (I guess).
If you take the example from the wiki, you can easily reproduce the
behaviour.
It is true for the client and for the server.
Here is the logic:
In the main class:
ChannelGroup channelGroup = ChabbelGroupFactory.getGroup(...);
ClientBootstrap bootstrap = new ClientBootstrap(...);
... (adding the handler and the channelGroup to the handler)
ChannelFuture future = bootstrap.connect(...).awaitUninterruptibly();
Channel channel = future.getChannel();
channelGroup.add(channel);
In the Handler:
void channelConnected(...) {
channelGroup.add(ctx.getChannel();
}
Back into the client main class:
channelGroup.close();
In this case, no problem.
But if I do:
channelGroup.close().awaitUninterruptibly();
It blocks forever...
Do I missed something?
Frederic
-----
Hardware/Software Architect
--
View this message in context: http://n2.nabble.com/Blocking-with-channelGroup.close-with-awaitUninterruptibly-tp1663985p1663985.html
Sent from the Netty Developer Group mailing list archive at Nabble.com.
More information about the netty-dev
mailing list