Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 65601 invoked from network); 18 Sep 2008 15:07:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2008 15:07:05 -0000 Received: (qmail 26964 invoked by uid 500); 18 Sep 2008 15:07:02 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 26938 invoked by uid 500); 18 Sep 2008 15:07:01 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 26927 invoked by uid 99); 18 Sep 2008 15:07:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2008 08:07:01 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2008 15:06:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 71D5F234C1DB for ; Thu, 18 Sep 2008 08:06:44 -0700 (PDT) Message-ID: <1634103942.1221750404465.JavaMail.jira@brutus> Date: Thu, 18 Sep 2008 08:06:44 -0700 (PDT) From: "David Calavera (JIRA)" To: abdera-dev@incubator.apache.org Subject: [jira] Commented: (ABDERA-197) AbderaClient only releases HTTPClient connections if an input stream is read In-Reply-To: <671422502.1218636524610.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.