From 3f6af1fc1d0ca72de6e9def6e9b94e42129bbbe3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 8 Oct 2019 07:40:23 -0700 Subject: [PATCH] Remember to return writability events to flow controller in HTTP2 Multiplexer (#9642) Motivation: Http2MultiplexCodec extends Http2FrameCodec extends Http2ConnectionHandler. It appears Http2MultiplexCodec overrode the channelWritabilityChanged method, which prevented the flow controller from becoming active. In the case the parent channel becomes unwritable, and then later becomes writable, it needs to indicate that the child channels can still write data. This is slightly confusing, because the child channels may still themselves be unwritable, but should still drain their data to the parent channel. Modification: Still propagate writability changes to the HTTP/2 flow controller Result: Fixes https://github.com/netty/netty/issues/9636 --- .../java/io/netty/handler/codec/http2/Http2MultiplexCodec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d9b28473f1..fe38382962 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 @@ -273,7 +273,7 @@ public class Http2MultiplexCodec extends Http2FrameCodec { forEachActiveStream(AbstractHttp2StreamChannel.WRITABLE_VISITOR); } - ctx.fireChannelWritabilityChanged(); + super.channelWritabilityChanged(ctx); } final void flush0(ChannelHandlerContext ctx) {