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:50 UTC

(camel) 04/06: CAMEL-20297 camel-main: 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 37825a955eb93386210f4941ea706658a283e0b7
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jan 16 11:01:59 2024 +0100

    CAMEL-20297 camel-main: do not swallow interrupted exceptions
---
 .../main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
index b4602be9760..d66fc9ec146 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultMainShutdownStrategy.java
@@ -111,7 +111,7 @@ public class DefaultMainShutdownStrategy extends SimpleMainShutdownStrategy {
                         // wait 1 sec and loop and log activity, so we can see we are waiting
                         done = latch.await(1000, TimeUnit.MILLISECONDS);
                     } catch (InterruptedException e) {
-                        // ignore
+                        Thread.currentThread().interrupt();
                     }
                 }
                 boolean success = done || main.getCamelContext().isStopped();