@Override public ChannelHandler getCodecHandler(XioServerConfig config) { return new TcpProxyCodec(proxyEndpoint); } }
@Override public void channelInactive(ChannelHandlerContext ctx) { if (outboundChannel != null) { closeOnFlush(outboundChannel); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { log.error("Error: ", cause); closeOnFlush(ctx.channel()); }