This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 a8cddb07be Review "Keep asynchronous timeouts in place until they are
processed"
a8cddb07be is described below
commit a8cddb07be6a4ae9ac091913e815fc8cb94c51b3
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 55934fca08..82704c0071 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]