From c3c51a164e1ea67b363b015e9cac562afa3f986d Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Mon, 10 May 2021 12:49:23 +0200 Subject: [PATCH] make sure the stream is not null before using it Signed-off-by: Ludovic Orban --- .../org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java index 659f6f6d8606..388e4587a171 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java @@ -587,7 +587,8 @@ public boolean failAllContent(Throwable failure) { if (LOG.isDebugEnabled()) LOG.debug("failing all content with {} {}", failure, this); - boolean atEof = getStream().failAllData(failure); + IStream stream = getStream(); + boolean atEof = stream == null || stream.failAllData(failure); atEof |= _contentDemander.failContent(failure); if (LOG.isDebugEnabled()) LOG.debug("failed all content, reached EOF? {}", atEof);