Github user jdpgrailsdev commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1212#discussion_r106723251
--- Diff: lib/java/src/org/apache/thrift/transport/THttpClient.java ---
@@ -304,6 +304,9 @@ private void flushUsingHttpClient() throws
TTransportException {
throw new TTransportException(ioe);
}
}
+ if (post != null) {
+ post.releaseConnection();
--- End diff --
@jeking3 From what we have seen in testing (when using the pooled
connection manager), the call to `releaseConnection` has to happen even when
the request/response is successful. If you think it makes more sense to move
this into the `try` block, that can be done. Also, I believe the `null` check
is necessary if a) this code stays in finally block and b) if the call to
create the `HttpPost` object fails for some reason (first line in the `try`).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---