[
https://issues.apache.org/jira/browse/HTTPCLIENT-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878433#action_12878433
]
Oleg Kalnichevski commented on HTTPCLIENT-942:
----------------------------------------------
I just wanted to demonstrate all possible cases of connection release: (1)
auto-release on exception (2) release without connection re-use on request
abort (3) normal release with connection re-use.
Oleg
> ClientConnectionRelease example is incorrect
> --------------------------------------------
>
> Key: HTTPCLIENT-942
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-942
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: Examples
> Reporter: Stepan Koltsov
> Priority: Minor
> Fix For: 4.1 Alpha3
>
>
> http://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.0.1/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java
> is incorrect:
> 1. if error happens in BufferedReader constructor (OutOfMemoryError,
> StackOverflowError), reader.close() is not called and connection is not
> released
> 2. if error happens in reader.readLine(), reader.close() is called, but
> httpget.abort() is not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]