@Override public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { Channel channel = new NettyChannel(ctx); final String remoteAddress = RemotingHelper.parseChannelRemoteAddr(channel); LOGGER.info("CLIENT : DISCONNECT {}", remoteAddress); closeChannel(channel); super.disconnect(ctx, promise); if (channelEventListener != null) { putRemotingEvent(new RemotingEvent(RemotingEventType.CLOSE, remoteAddress, channel)); } }