Example #1
0
  @Override
  public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
    super.channelClosed(ctx, e);

    if (!ctx.getChannel().isOpen()) {
      tryToFinishOffChannel(ctx.getChannel());
    }

    channelGroup.remove(e.getChannel());
  }
 @Override
 public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
   channelGroup.remove(ctx.getChannel());
 }
 public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) {
   // Unregister the channel from the global channel list
   // so the channel does not receive messages anymore.
   channels.remove(e.getChannel());
 }
Example #4
0
 /** @param channel channel to close */
 public void closeChannel(Channel channel) {
   channel.close().awaitUninterruptibly();
   allChannels.remove(channel);
 }