From: eletuchy Date: Mon, 25 Jun 2007 18:29:28 +0000 (+0000) Subject: [thrift] java httpclient needs to close its inputstream X-Git-Tag: 0.2.0~1330 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=66ccee2a7489a26d58197f75c0136eebdb345dff;p=common%2Fthrift.git [thrift] java httpclient needs to close its inputstream Reviewed By: mcslee Test Plan: run as part of aim importer Revert Plan: sure Notes: EImportant: git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665142 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/java/src/transport/THttpClient.java b/lib/java/src/transport/THttpClient.java index aa0f0a3a..8b42ba3d 100644 --- a/lib/java/src/transport/THttpClient.java +++ b/lib/java/src/transport/THttpClient.java @@ -50,7 +50,16 @@ public class THttpClient extends TTransport { public void open() {} - public void close() {} + public void close() { + if (null != inputStream_) { + try { + inputStream_.close(); + } catch (IOException ioe) { + ; + } + inputStream_ = null; + } + } public boolean isOpen() { return true;