You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/03/20 07:15:55 UTC

[camel] 09/14: CAMEL-12379 - Shutdown only AWS clients owned by the context - AWS Lambda

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

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

commit 5478d1553e1ccffae0da8e1df6acae94d111649c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 20 08:07:12 2018 +0100

    CAMEL-12379 - Shutdown only AWS clients owned by the context - AWS Lambda
---
 .../java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java
index 5d57793..b83ffd9 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/lambda/LambdaEndpoint.java
@@ -69,8 +69,10 @@ public class LambdaEndpoint extends DefaultEndpoint {
     
     @Override
     public void doStop() throws Exception {
-        if (awsLambdaClient != null) {
-            awsLambdaClient.shutdown();
+        if (ObjectHelper.isEmpty(configuration.getAwsLambdaClient())) {
+            if (awsLambdaClient != null) {
+                awsLambdaClient.shutdown();
+            }
         }
         super.doStop();
     }

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.