diff --git a/src/main/java/com/elasticsearch/dash/exporters/ESExporter.java b/src/main/java/com/elasticsearch/dash/exporters/ESExporter.java index e7e22e26e54..0f327353718 100644 --- a/src/main/java/com/elasticsearch/dash/exporters/ESExporter.java +++ b/src/main/java/com/elasticsearch/dash/exporters/ESExporter.java @@ -117,6 +117,7 @@ public class ESExporter extends AbstractLifecycleComponent implement if (conn.getResponseCode() != 201) { logger.error("Remote target didn't respond with 201 Created"); } + conn.getInputStream().close(); // close and release to connection pool. } catch (IOException e) { logger.error("Error connecting to target", e);