ctx.writeAndFlush(new DefaultHttpContent(wrapWithLN(frame.content())), promise);
if (frame instanceof CloseFrame) {
ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT).addListener(ChannelFutureListener.CLOSE);
}
if (maxBytesLimit(frame.content().readableBytes())) {
logger.debug("max bytesSize limit reached [{}]", config.maxStreamingBytesSize());
ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT).addListener(ChannelFutureListener.CLOSE);
}
} else {
ctx.writeAndFlush(ReferenceCountUtil.retain(msg), promise);