You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/02/10 21:02:37 UTC
(tomcat) 02/02: Fix BZ 69870 - add drainTimeout to HTTP/2
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 9917c2fbea26051c2fec85847063b549e22d9480
Author: Mark Thomas <ma...@apache.org>
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 d61bec3d44..ee9f82ae76 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 cbc1471f97..6c80857562 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org