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

davsclaus pushed a commit to branch CAMEL-17515
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b5405394529593cf48ec095c2eba393ff2f1cb4e
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Apr 4 11:01:05 2022 +0200

    CAMEL-17515: Camel should report DOWN for readiness check during graceful 
shutdown (stopping camel context)
---
 .../src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
 
b/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
index 069da3fd18a..bfa9a6505b1 100644
--- 
a/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
+++ 
b/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
@@ -56,7 +56,8 @@ public final class ContextHealthCheck extends 
AbstractHealthCheck {
 
             if (getCamelContext().getStatus().isStarted()) {
                 builder.up();
-            } else if (getCamelContext().getStatus().isStopped()) {
+            } else if (getCamelContext().isStopping() || 
getCamelContext().isStopped()) {
+                // not ready during graceful shutdown
                 builder.down();
             }
         }

Reply via email to