Skip to content

Commit 8c30fa7

Browse files
committed
Avoid reads waiting to time out when the container resets the stream
1 parent 9a6c6d3 commit 8c30fa7

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

java/org/apache/coyote/http2/Stream.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,7 @@ final void swallowUnread() throws IOException {
15121512
inBuffer.position(0);
15131513
inBuffer.limit(inBuffer.limit() - unreadByteCount);
15141514
}
1515+
inBuffer.notifyAll();
15151516
}
15161517
// Do this outside of the sync because:
15171518
// - it doesn't need to be inside the sync

webapps/docs/changelog.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@
271271
than using OpenSSL's default TLS groups when using Tomcat Native with
272272
OpenSSL based connectors. (markt)
273273
</fix>
274+
<fix>
275+
For HTTP/2, ensure that any in progress request body reads are cancelled
276+
if the container resets the associated stream. This prevents delays
277+
waiting for reads to time out when it is known that no more data will be
278+
received. (markt)
279+
</fix>
274280
</changelog>
275281
</subsection>
276282
<subsection name="Jasper">

0 commit comments

Comments
 (0)