From 4ec51fbbcafbc720808342d6702bbedf816d5a25 Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Mon, 15 Feb 2021 11:28:10 +0100 Subject: [PATCH] abort when onError() fails Signed-off-by: Ludovic Orban --- .../java/org/eclipse/jetty/server/HttpChannel.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 a7c1eb35d4f..e4f5d275f1f 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 @@ -701,9 +701,20 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor } if (isCommitted()) + { abort(failure); + } else - _state.onError(failure); + { + try + { + _state.onError(failure); + } + catch (IllegalStateException e) + { + abort(failure); + } + } } /**