From df920ec7632eb3e313755d36bf06d40464382d21 Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Mon, 18 Nov 2024 15:58:22 +0100 Subject: [PATCH] #12520 proper fix? Signed-off-by: Ludovic Orban --- .../eclipse/jetty/ee9/nested/HttpChannelState.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannelState.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannelState.java index 5e749f09cab9..24a481b23078 100644 --- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannelState.java +++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannelState.java @@ -363,12 +363,14 @@ Boolean abort(Throwable failure) { boolean handle = _state == State.WAITING; if (handle) + { _state = State.WOKEN; - // XXX changing the RequestState to COMPLETED *and* returning true here - // means completed(Throwable failure) will be called by the redispatching - // and the latter will throw on its _requestState check as it wants it - // to be COMPLETING. - _requestState = RequestState.COMPLETED; + _requestState = RequestState.COMPLETING; + } + else + { + _requestState = RequestState.COMPLETED; + } return handle; } return null; @@ -1025,7 +1027,7 @@ protected void completed(Throwable failure) LOG.debug("completed {}", toStringLocked()); if (_requestState != RequestState.COMPLETING) - return; // Already completed, possibly by abort(). + throw new IllegalStateException(this.getStatusStringLocked()); if (_event == null) {