About SimpleChannelHandler.channelDisconnected

brunodecarvalho kindernade at gmail.com
Thu Nov 4 07:07:01 EDT 2010


You'll always need the flag there. Whether it's external to Channel (like I
suggested) or internal to the Channel (and Netty would handle the scenario I
described earlier internally) is a tough decision to make.

If it were up to me, I'd leave it out because this way you offer programmers
more explicit control on what to do. Even though this is one of those cases
that is very easy to overlook, there may be some weird scenario in which you
actually want to handle a remote disconnection differently from a local
disconnection even after you explicitly called close().

Let's call this "flag" a "state" instead. Sounds less hacky and describes
it's purpose better ;)


Cheers,
  Bruno
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/About-SimpleChannelHandler-channelDisconnected-tp5702676p5704904.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list