@Override
    public void exceptionCaught(NioChannel channel, Exception cause) {
        Channel ch = new LtsChannel(channel);
        final String remoteAddress = RemotingHelper.parseChannelRemoteAddr(ch);
        LOGGER.warn(sideType + ": exceptionCaught {}", remoteAddress, cause);

        if (remoting.getChannelEventListener() != null) {
            remoting.putRemotingEvent(new RemotingEvent(RemotingEventType.EXCEPTION, remoteAddress, ch));
        }
        RemotingHelper.closeChannel(ch);
    }
@author Robert HG (254963746@qq.com) on 2/8/16.
lts-core/src/main/java/com/github/ltsopensource/remoting/lts/LtsEventHandler.java