diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index fbd82f70a3c..79c113502b5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -23,6 +23,7 @@ import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.ClosedChannelException; import java.util.List; +import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -305,7 +306,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor Throwable ex=_state.getAsyncContextEvent().getThrowable(); String reason="Async Timeout"; - if (ex!=null) + if (ex!=null && !(ex instanceof TimeoutException)) { reason="Async Exception"; _request.setAttribute(RequestDispatcher.ERROR_EXCEPTION,ex); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java index 9e03972eaf2..9ebbf8b977d 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java @@ -458,7 +458,6 @@ public class HttpChannelState if (_state==State.ASYNC_WAIT) { _state=State.ASYNC_WOKEN; - _event.setThrowable(new TimeoutException("async")); dispatch=true; } }