diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java b/java/org/apache/coyote/http2/Http2UpgradeHandler.java index e5ae91f679e1..a9ab68def927 100644 --- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java +++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java @@ -815,8 +815,10 @@ int reserveWindowSize(Stream stream, int reservation, boolean block) throws IOEx stream.wait(writeTimeout); } // Has this stream been granted an allocation + // Note: If the stream in not in this Map then the + // requested write has been fully allocated int[] value = backLogStreams.get(stream); - if (value[1] == 0) { + if (value != null && value[1] == 0) { // No allocation // Close the connection. Do this first since // closing the stream will raise an exception