Hello,
Regarding this posts:
> Any help in this issue would be much appreciated.
> Thanks
> mrhuang
>
> I am not quite sure I understand the issue. You should not even be using
> #releaseConnection in the first place. It is provided for compatibility with
> HC 3.x. You should always close CloseableHttpResponse in a try-finally or
> try-with-resources.
> Oleg
You say that using CloseableHttpResponse is the right way to release a
connection. Currently, our code to release a connection is the above (works
fine):
if (entity != null)
{
try { EntityUtils.consume(entity); }
catch (Exception e) {}
}
else
{
if (objPost != null) objPost.abort();
else if (objGet != null) objGet.abort();
}
Do you think it's preferrable to change this code by one that directly closes
the CloseableHttpResponse?
Thanks,
Joan.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]