Netty dead connects
Christian Migowski
chrismfwrd at gmail.com
Fri Jan 14 02:47:22 EST 2011
Are you aware of ChannelGroup
(http://docs.jboss.org/netty/3.2/api/org/jboss/netty/channel/group/ChannelGroup.html)?
It holds a list of channels, and closed ones are automatically removed
from it.
A general note: you should really read the Netty examples and javadoc
of the used classes, there is lots of information in it that would
help you correct/extend your understanding of Netty. All your
questions are already answered in there.
On Thu, Jan 13, 2011 at 5:14 PM, sifman <watsis at hotmail.com> wrote:
>
> I have some more news on this.
>
> The IdleStateHandler does not work for connections which are already closed.
>
> Is there a proper way of checking if a connection is still alive by using
> the org.jboss.netty.channel.Channel API, eg:
> #isOpen()
> #isConnected()
> etc.
>
> I discovered with some intenstive debugging that there is no way to rely on
> the IdleStateHandler if a connection is in the closed state. It only works
> for an active connection. What I also noticed is that even though channels
> close intermittently the Handler#channelClosed method is not always called.
> I'm correct in assuming that it won't always be called due to unforeseen
> connection instability on the interwebs?
>
> What I need to do is to check with a ConnectionSweeper mechanism if a
> connection in my list is still alive or not.
>
> Any advice is really appreciated. This has become a showstopper for me.
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-dead-connections-tp5900060p5918768.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