@Override public void channelInactive(ChannelHandlerContext ctx) { channelGroup.remove(ctx.channel()); ctx.fireChannelInactive(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) { allChannels.remove(ctx.channel()); NettyRpcServer.LOG.trace("Connection {}; caught unexpected downstream exception.", ctx.channel().remoteAddress(), e.getCause()); ctx.channel().close(); } }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { allChannels.remove(ctx.channel()); NettyRpcServer.LOG.trace("Disconnection {}; # active connections={}", ctx.channel().remoteAddress(), (allChannels.size() - 1)); super.channelInactive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) { channelGroup.remove(ctx.channel()); ctx.fireChannelInactive(); }