This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 6cc7082733 Review "Keep asynchronous timeouts in place until they are
processed"
6cc7082733 is described below
commit 6cc708273397d4f1f41eb78b4e44531673cacd48
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 0e5a7c20be..d1db968c74 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]