@Override
 public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
   if (bufferedMode && outboundChannel.isActive()) {
     flushedBuffer = true;
     outboundChannel
         .writeAndFlush(interceptor.intercept(ctx, channelBuffer, logger))
         .addListener(
             new ChannelFutureListener() {
               @Override
               public void operationComplete(ChannelFuture future) throws Exception {
                 if (future.isSuccess()) {
                   channelBuffer.clear();
                 } else {
                   future.channel().close();
                 }
               }
             });
   }
   super.channelReadComplete(ctx);
 }
 @Override
 public void channelInactive(ChannelHandlerContext ctx) throws Exception {
   httpClientResponseHandler.handleChannelInactive(ctx);
   super.channelReadComplete(ctx);
 }