This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 2698c84914fd49697b86816960a16b4bb7710c07 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 ead0d221e9..83278c4187 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -252,6 +252,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 6ececcba13..bf34e3f798 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]
