How to close a connection *immediately*.

Luis Neves luis.neves at gmail.com
Wed May 5 14:03:06 EDT 2010


It doesn't seem possible to close an established connection when the
write queue is full.

The following idiom doesn't seem to work:

if (channel.isWritable())
{
channel.write(message);
}
else
{
channel.close();
}


the channelClosed() method in the handler is not called. I presume
because there still messages in the write queue.

How can I effectively close the connection?

TIA.

--
Luis Neves


More information about the netty-users mailing list