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

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

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 cdd754a7819d28828aafb820b05385f8e06bc336
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 20 07:53:12 2018 +0100

    CAMEL-12379 - Shutdown only AWS clients owned by the context - AWS S3
---
 .../main/java/org/apache/camel/component/aws/s3/S3Endpoint.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
index 76ce195..d6a2ffe 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
@@ -38,6 +38,7 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.SynchronizationAdapter;
 import org.apache.camel.util.IOHelper;
+import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -140,8 +141,10 @@ public class S3Endpoint extends ScheduledPollEndpoint {
 
     @Override
     public void doStop() throws Exception {
-        if (s3Client != null) {
-            s3Client.shutdown();
+        if (ObjectHelper.isEmpty(configuration.getAmazonS3Client())) {
+            if (s3Client != null) {
+                s3Client.shutdown();
+            }
         }
         super.doStop();
     }

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