This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new ad5fe4e703 Review "Keep asynchronous timeouts in place until they are 
processed"
ad5fe4e703 is described below

commit ad5fe4e7036aa4bbe6bcfbc381dbf5f0e561f483
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Oct 30 19:45:13 2026 +0000

    Review "Keep asynchronous timeouts in place until they are processed"
    
    Fix regression (duplicate Timeout events) in HTTP/2
---
 java/org/apache/coyote/http2/StreamProcessor.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index c680b1ce24..74e77cb140 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -85,6 +85,7 @@ class StreamProcessor extends AbstractProcessor implements 
NonPipeliningProcesso
         try {
             // Note: The regular processor uses the socketWrapper lock, but 
using that here triggers a deadlock
             processLock.lock();
+            // HTTP/2 equivalent of AbstractConnectionHandler#process() 
without the socket <-> processor mapping
             try {
                 /*
                  * In some scenarios, error handling may trigger multiple 
ERROR events for the same stream. The first
@@ -95,8 +96,10 @@ class StreamProcessor extends AbstractProcessor implements 
NonPipeliningProcesso
                 if (!stream.equals(handler.getStream(stream.getIdAsInt()))) {
                     return;
                 }
-                // HTTP/2 equivalent of AbstractConnectionHandler#process() 
without the
-                // socket <-> processor mapping
+                // Avoid duplicate timeout events
+                if (event == SocketEvent.TIMEOUT && 
!checkAsyncTimeoutGeneration()) {
+                    return;
+                }
                 SocketState state = SocketState.CLOSED;
                 boolean reuseRequestAndResponse = false;
                 try {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to