CorsHandler.write(...) should not cause a flush. (#7839)
Motivation: Unnecessary flushes reduce the amount of flush coalescing that can happen at higher levels and thus can increase number of packets (because of TCP_NODELAY) and lower throughput (due to syscalls, TLS frames, etc) Modifications: Replace writeAndFlush(...) with write(...) Result: Fixes https://github.com/netty/netty/issues/7837.
This commit is contained in:
parent
473f6a6edb
commit
ee9057ad99
@ -205,7 +205,7 @@ public class CorsHandler extends ChannelDuplexHandler {
|
|||||||
setExposeHeaders(response);
|
setExposeHeaders(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.writeAndFlush(msg, promise);
|
ctx.write(msg, promise);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void forbidden(final ChannelHandlerContext ctx, final HttpRequest request) {
|
private static void forbidden(final ChannelHandlerContext ctx, final HttpRequest request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user