From 14ae5fab3a2d4184a6894554cac09fe21c6abf8b Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Tue, 28 May 2013 12:39:54 +0200 Subject: [PATCH] explicitly closing URLConnection inputstream as required by documentation (since we don't read it). Original commit: elastic/x-pack-elasticsearch@51d7bef23fb6ebed08c6038559425030d8785ae4 --- src/main/java/com/elasticsearch/dash/exporters/ESExporter.java | 1 + 1 file changed, 1 insertion(+) 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);