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 c4edfb29ffe84cf0c14ce1fcc6e5f71133bf9940
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Thu Feb 15 09:32:59 2018 +0100

    CAMEL-12268 - Camel-AWS: Lets call shutdown on the clients while stopping 
endpoints - AWS EC2
---
 .../main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
index bd00ee9..0b440c5 100644
--- 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
+++ 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java
@@ -69,6 +69,14 @@ public class EC2Endpoint extends ScheduledPollEndpoint {
         
         ec2Client = configuration.getAmazonEc2Client() != null ? 
configuration.getAmazonEc2Client() : (AmazonEC2Client) createEc2Client();
     }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (ec2Client != null) {
+            ec2Client.shutdown();
+        }
+        super.doStop();
+    }
 
     public EC2Configuration getConfiguration() {
         return configuration;

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

Reply via email to