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

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


The following commit(s) were added to refs/heads/camel-4.8.x by this push:
     new 26fcb6b0070 Fix thread pool cleanup in MasterComponent (#17705)
26fcb6b0070 is described below

commit 26fcb6b0070219e9207fd3a7fce870e12b45c156
Author: Bruno Mendola <1853562+brunomend...@users.noreply.github.com>
AuthorDate: Thu Apr 10 13:46:02 2025 +0200

    Fix thread pool cleanup in MasterComponent (#17705)
    
    I noticed that the condition to cleanup the thread pool is wrong, so it 
actually never gets cleaned up when stopping the component.
---
 .../main/java/org/apache/camel/component/master/MasterComponent.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java
 
b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java
index c986abde42e..b4d8bc4e59f 100644
--- 
a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java
+++ 
b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java
@@ -166,7 +166,7 @@ public class MasterComponent extends DefaultComponent {
     protected void doStop() throws Exception {
         super.doStop();
 
-        if (backOffThreadPool == null) {
+        if (backOffThreadPool != null) {
             
getCamelContext().getExecutorServiceManager().shutdown(backOffThreadPool);
             backOffThreadPool = null;
         }

Reply via email to