This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 12ec0a0d26 Fix BZ 69870 - add drainTimeout to HTTP/2
12ec0a0d26 is described below
commit 12ec0a0d26169c3b237f8931c8ae11cda14e9dc2
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Feb 10 20:58:10 2026 +0000
Fix BZ 69870 - add drainTimeout to HTTP/2
---
java/org/apache/coyote/http2/Http2Protocol.java | 10 +++++-----
webapps/docs/changelog.xml | 7 +++++++
webapps/docs/config/http2.xml | 12 ++++++++++++
3 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/java/org/apache/coyote/http2/Http2Protocol.java
b/java/org/apache/coyote/http2/Http2Protocol.java
index efc961ffce..d6ad4b1e7a 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -114,11 +114,11 @@ public class Http2Protocol implements UpgradeProtocol {
/*
* Additional time in nanoseconds between sending the first graceful
GOAWAY (max stream id) and the final GOAWAY
- * (last seen stream id). During this time the server will continue to
process new streams on the connection.
- * This is to mitigate the race of client-buffered/sent packets for new
streams and the final GOAWAY (with last
- * seen stream id). By default, Tomcat uses the last computed RTT for this
interval, but the RTT might have
- * fluctuated due to network or server load conditions, or the client
(e.g. nghttp2) might have already buffered
- * frames for opening new streams on a connection.
+ * (last seen stream id). During this time the server will continue to
process new streams on the connection. This
+ * is to mitigate the race of client-buffered/sent packets for new streams
and the final GOAWAY (with last seen
+ * stream id). By default, Tomcat uses the last computed RTT for this
interval, but the RTT might have fluctuated
+ * due to network or server load conditions, or the client (e.g. nghttp2)
might have already buffered frames for
+ * opening new streams on a connection.
*
* The name "drainTimeout" is taken from Envoy proxy's identical HTTP
Connection Manager property and means exactly
* the same.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8840236f21..14ef4f18e8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -132,6 +132,13 @@
<code>CBC</code>when setting the <code>ciphers</code> attribute of
an <code>SSLHostConfig</code> element. (markt)
</fix>
+ <add>
+ <bug>69870</bug>: Add a <code>drainTimeout</code> to the HTTP/2
+ <code>UpgradeProtocol</code> element to allow configuration of an
+ time between the two final <code>GOAWAY</code> frames sent by Tomcat
+ when closing am HTTP/2 connection. Pull request <pr>917</pr> provided
by
+ Kai Burjack. (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Jasper">
diff --git a/webapps/docs/config/http2.xml b/webapps/docs/config/http2.xml
index 4f288c9598..fb427e1632 100644
--- a/webapps/docs/config/http2.xml
+++ b/webapps/docs/config/http2.xml
@@ -88,6 +88,18 @@
If not specified, this attribute is set to <code>false</code>.</p>
</attribute>
+ <attribute name="drainTimpout" required="false">
+ <p>Additional time in nanoseconds between sending the first graceful
+ GOAWAY (max stream id) and the final GOAWAY (last seen stream id). During
+ this time the server will continue to process new streams on the
+ connection. This is to mitigate the race of client-buffered/sent packets
+ for new streams and the final GOAWAY (with last seen stream id). By
+ default, Tomcat uses the last computed RTT for this interval, but the RTT
+ might have fluctuated due to network or server load conditions, or the
+ client might have already buffered frames for opening new streams on a
+ connection. If not specified, this attribute is set to
<code>0</code>.</p>
+ </attribute>
+
<attribute name="initialWindowSize" required="false">
<p>Controls the initial size of the flow control window for streams that
Tomcat advertises to clients. If not specified, the default value of
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]