You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/01/18 14:16:47 UTC

(camel) 01/06: CAMEL-20297 camel-base-engine: do not swallow interrupted exceptions

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 47ebb9ff8e8007b1d7b97c16acd26c46e10fedc3
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jan 16 11:01:29 2024 +0100

    CAMEL-20297 camel-base-engine: do not swallow interrupted exceptions
---
 .../main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
index b6c4123eca8..d99a0bc1344 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultShutdownStrategy.java
@@ -693,6 +693,7 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS
 
                         Thread.sleep(loopDelaySeconds * 1000);
                     } catch (InterruptedException e) {
+                        Thread.currentThread().interrupt();
                         if (abortAfterTimeout) {
                             LOG.warn("Interrupted while waiting during graceful shutdown, will abort.");
                             return;