@Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
        Connection conn = ctx.channel().attr(Connection.CONNECTION).get();
        if (conn != null) {
            this.getConnectionManager().remove(conn);
        }
        super.channelInactive(ctx);
    }
@see com.alipay.remoting.ConnectionEventHandler#channelInactive(io.netty.channel.ChannelHandlerContext)
src/main/java/com/alipay/remoting/rpc/RpcConnectionEventHandler.java