@Override
        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {

            com.github.ltsopensource.remoting.Channel channel = new NettyChannel(ctx);

            final String remoteAddress = RemotingHelper.parseChannelRemoteAddr(channel);
            LOGGER.warn("SERVER: exceptionCaught {}", remoteAddress, cause);

            if (channelEventListener != null) {
                putRemotingEvent(new RemotingEvent(RemotingEventType.EXCEPTION, remoteAddress, channel));
            }

            RemotingHelper.closeChannel(channel);
        }
@author Robert HG (254963746@qq.com) on 11/3/15.
lts-core/src/main/java/com/github/ltsopensource/remoting/netty/NettyRemotingServer.java