You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "David Calavera (JIRA)" <ji...@apache.org> on 2008/09/18 17:06:44 UTC
[jira] Commented: (ABDERA-197) AbderaClient only releases
HTTPClient connections if an input stream is read
[ https://issues.apache.org/jira/browse/ABDERA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632238#action_12632238 ]
David Calavera commented on ABDERA-197:
---------------------------------------
You can use the release method in order to release the connection:
public void testConnectionClosingWithoutUsingInputStream() {
RequestOptions opts = new RequestOptions();
opts.setUseLocalCache(false);
AbderaClient client = new AbderaClient(Abdera.getInstance());
for(int i=0; i<10; i++)
client.get("http://www.google.com", opts).release(); /* release method releases the http connection */
}
> AbderaClient only releases HTTPClient connections if an input stream is read
> ----------------------------------------------------------------------------
>
> Key: ABDERA-197
> URL: https://issues.apache.org/jira/browse/ABDERA-197
> Project: Abdera
> Issue Type: Bug
> Affects Versions: 0.4.0
> Reporter: Aaron Evans
> Attachments: TestAbderaClient.java
>
>
> AbderaClient uses an AutoReleasingInputStream which is responsible for calling releaseConnection on the underlying HTTPClient method. If a user of the AbderaClient does not read the input stream in a response, then the connection leaks. I'm attaching a test case with two tests: one that never completes because the input stream is not read and another that completes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.