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
commit aa55d1061ae6bd1ac20405455462f21272946239 Author: Mark Thomas <[email protected]> AuthorDate: Fri Nov 6 20:54:59 2026 +0000 Fix backport --- java/org/apache/coyote/AbstractProcessor.java | 8 ++++++-- java/org/apache/coyote/AbstractProcessorLight.java | 4 +++- java/org/apache/coyote/AsyncStateMachine.java | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/AbstractProcessor.java b/java/org/apache/coyote/AbstractProcessor.java index cfa2f8c16f..b13076f998 100644 --- a/java/org/apache/coyote/AbstractProcessor.java +++ b/java/org/apache/coyote/AbstractProcessor.java @@ -225,7 +225,7 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement @Override - public SocketState asyncPostProcess() { + public SocketState asyncPostProcess() throws IOException { return asyncStateMachine.asyncPostProcess(); } @@ -648,7 +648,11 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement break; } case ASYNC_POST_PROCESS: { - asyncStateMachine.asyncPostProcess(); + try { + asyncStateMachine.asyncPostProcess(); + } catch (IOException ioe) { + handleIOException(ioe); + } break; } diff --git a/java/org/apache/coyote/AbstractProcessorLight.java b/java/org/apache/coyote/AbstractProcessorLight.java index c83e9db48e..b3e53a13c2 100644 --- a/java/org/apache/coyote/AbstractProcessorLight.java +++ b/java/org/apache/coyote/AbstractProcessorLight.java @@ -220,8 +220,10 @@ public abstract class AbstractProcessorLight implements Processor { * Calls the post process of the async state machine. * * @return The state the caller should put the socket in when this method returns + * + * @throws IOException If an I/O error occurs during the processing of the request */ - protected abstract SocketState asyncPostProcess(); + protected abstract SocketState asyncPostProcess() throws IOException; /** * Returns the logger associated with this processor type. diff --git a/java/org/apache/coyote/AsyncStateMachine.java b/java/org/apache/coyote/AsyncStateMachine.java index e430df62a0..3d9c50170f 100644 --- a/java/org/apache/coyote/AsyncStateMachine.java +++ b/java/org/apache/coyote/AsyncStateMachine.java @@ -16,6 +16,7 @@ */ package org.apache.coyote; +import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.concurrent.atomic.AtomicLong; @@ -285,7 +286,7 @@ class AsyncStateMachine { * Async has been processed. Whether or not to enter a long poll depends on current state. For example, as per * SRV.2.3.3.3 can now process calls to complete() or dispatch(). */ - synchronized SocketState asyncPostProcess() { + synchronized SocketState asyncPostProcess() throws IOException { if (state == AsyncState.COMPLETE_PENDING) { clearNonBlockingListeners(); updateState(AsyncState.COMPLETING); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
