From 036cbe8dd4f3147d5a3af0a5313c5732a78789c7 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Wed, 23 Mar 2022 19:13:54 +0100 Subject: [PATCH] Fixes #7548 - Interrupt flag is not always cleared in between requests. (#7563) (#7773) Now clearing the interrupt flag. Signed-off-by: Simone Bordet (cherry picked from commit 7b648f6d5caf118c654ef6a7f83473f7912c404c) --- .../eclipse/jetty/util/thread/ReservedThreadExecutor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java index 4c62b71f838..9b6b8a59dcf 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java @@ -412,6 +412,11 @@ public class ReservedThreadExecutor extends AbstractLifeCycle implements TryExec { LOG.warn("Unable to run task", e); } + finally + { + // Clear any interrupted status. + Thread.interrupted(); + } } } finally