Fix test failures. Handle full allocation case. · apache/tomcat@ada725a · GitHub
Skip to content

Commit

Permalink
Fix test failures. Handle full allocation case.
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed May 3, 2019
1 parent d127a09 commit ada725a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/org/apache/coyote/http2/Http2UpgradeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,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
Expand Down

0 comments on commit ada725a

Please sign in to comment.