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

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

commit bf4cecb249a25bb21c98022e1ad78397e24d77f1
Author: Andrea Cosentino <[email protected]>
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
[email protected].

Reply via email to