From 6e6edb59e709f0c6ddbff8345395e15a5df85ac2 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 29 Jan 2018 10:28:41 +0100 Subject: [PATCH] Remove unused variable in DefaultHttp2StreamChannel Motivation: We should remove unused variable (was never read). Modifications: Remove unused variable (was never read). Result: Cleanup. --- .../netty/handler/codec/http2/Http2MultiplexCodec.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodec.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodec.java index 246b381059..a2911bfda7 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodec.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodec.java @@ -441,7 +441,6 @@ public class Http2MultiplexCodec extends Http2FrameCodec { // Keeps track of flush calls in channelReadComplete(...) and aggregate these. private boolean inFireChannelReadComplete; - private boolean flushPending; boolean fireChannelReadPending; @@ -1083,13 +1082,11 @@ public class Http2MultiplexCodec extends Http2FrameCodec { return; } try { - // If we are current channelReadComplete(...) call we should just mark this Channel with a flush - // pending. We will ensure we trigger ctx.flush() after we processed all Channels later on and + // If we are currently in the channelReadComplete(...) call we should just ignore the flush. + // We will ensure we trigger ctx.flush() after we processed all Channels later on and // so aggregate the flushes. This is done as ctx.flush() is expensive when as it may trigger an // write(...) or writev(...) operation on the socket. - if (inFireChannelReadComplete) { - flushPending = true; - } else { + if (!inFireChannelReadComplete) { flush0(ctx); } } finally {