explicitly closing URLConnection inputstream as required by documentation (since we don't read it).

Original commit: elastic/x-pack-elasticsearch@51d7bef23f
This commit is contained in:
Boaz Leskes 2013-05-28 12:39:54 +02:00
parent 9fcfa712f4
commit 14ae5fab3a
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ public class ESExporter extends AbstractLifecycleComponent<ESExporter> implement
if (conn.getResponseCode() != 201) { if (conn.getResponseCode() != 201) {
logger.error("Remote target didn't respond with 201 Created"); logger.error("Remote target didn't respond with 201 Created");
} }
conn.getInputStream().close(); // close and release to connection pool.
} catch (IOException e) { } catch (IOException e) {
logger.error("Error connecting to target", e); logger.error("Error connecting to target", e);