Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
all
-
Important
Description
In Kylin-jdbc module, the class KylinClient has TCP resource leak when it sends http request. For example, like the following code snipper
HttpResponse response = httpClient.execute(post);
try {
if (response.getStatusLine().getStatusCode() != 200 && response.getStatusLine().getStatusCode() != 201)Unknown macro: { throw asIOException(post, response); }SQLResponseStub stub = jsonMapper.readValue( response.getEntity().getContent(), SQLResponseStub.class);
return stub;
} finallyUnknown macro: { post.releaseConnection(); }
The code HttpClient.execute(post) is not in try segment, if it throws exception internally ,
the finally segment won't run.
Attachments
Issue Links
- links to