abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Calavera (JIRA)" <j...@apache.org>
Subject [jira] Commented: (ABDERA-197) AbderaClient only releases HTTPClient connections if an input stream is read
Date Thu, 18 Sep 2008 15:06:44 GMT

    [ 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.


Mime
View raw message