Close client channel

Christian Migowski chrismfwrd at gmail.com
Thu Aug 20 01:56:30 EDT 2009


Hi Rahul,

On Thu, Aug 20, 2009 at 7:43 AM, Rahul Patil<rpatil at fusionops.com> wrote:
>
> All,
> I have been working on netty for a while now and really fascinated by its
> flexible and powerful design.
> Currently, I am running into one issue where I need some help.
> I need to open multiple channels on the client, write some data to it and
> then close.
> I am using the same ClientSocketFactory and do bootstrap.connect() every
> time I need a new channel.
> One I am done with the channel I am closing it by channel.close().
> However, when I do netstat I still see the socket with "Established" status.
> As I keep on creating new channels (by bootstrap.connect()) the
> "Established" socket count keeps piling up.
> How do I close the channel so that it gets removed from the "Established"
> status.

Channel.close() does close the TCP connection - I assume a bug in your
code, if you don't think so, could you assemble a small program which
demonstrates your problem?
Have you checked that you call close on the right channels? Netty
doesn't complain if you call close() on a channel that you already
closed.

hth,
regards,
christian!


> Am I missing out something here?
> Please suggest.
> Thanks
> Rahul
> --
> View this message in context: http://n2.nabble.com/Close-client-channel-tp3477094p3477094.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>


More information about the netty-users mailing list