diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java index d9e46c2ec7..51f1518a53 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java @@ -261,7 +261,7 @@ public final class Http2CodecUtil { */ @Override public ChannelPromise setFailure(Throwable cause) { - if (awaitingPromises()) { + if (awaitingPromises() || expectedCount == 0) { ++failureCount; if (failureCount == 1) { promise.setFailure(cause);