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/11/09 07:57:49 UTC
[camel] 02/03: Camel-Elastisearch-rest: the restHighLevelClient
must be closed when disconnecting
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 9e74ea0eed542dc20a13097cd18114afbcbefff7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 9 08:53:15 2018 +0100
Camel-Elastisearch-rest: the restHighLevelClient must be closed when disconnecting
---
.../org/apache/camel/component/elasticsearch/ElasticsearchProducer.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchProducer.java b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchProducer.java
index 7822cbe..314b4c2 100644
--- a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchProducer.java
+++ b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchProducer.java
@@ -227,6 +227,7 @@ public class ElasticsearchProducer extends DefaultProducer {
}
if (configuration.getDisconnect()) {
IOHelper.close(client);
+ IOHelper.close(restHighLevelClient);
client = null;
if (configuration.getEnableSniffer()) {
IOHelper.close(sniffer);