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 00c431573775cf5922b9566067c39799d91557b2 Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Mar 20 08:03:31 2018 +0100 CAMEL-12379 - Shutdown only AWS clients owned by the context - AWS EC2 --- .../main/java/org/apache/camel/component/aws/ec2/EC2Endpoint.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 0b440c5..77c4ea3 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 @@ -72,8 +72,10 @@ public class EC2Endpoint extends ScheduledPollEndpoint { @Override public void doStop() throws Exception { - if (ec2Client != null) { - ec2Client.shutdown(); + if (ObjectHelper.isEmpty(configuration.getAmazonEc2Client())) { + if (ec2Client != null) { + ec2Client.shutdown(); + } } super.doStop(); } -- To stop receiving notification emails like this one, please contact [email protected].
