hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCORE-12) "finally" bug in samples
Date Mon, 11 Sep 2006 19:23:22 GMT
     [ http://issues.apache.org/jira/browse/HTTPCORE-12?page=all ]

Oleg Kalnichevski resolved HTTPCORE-12.
---------------------------------------

    Resolution: Invalid

> "finally" bug in samples
> ------------------------
>
>                 Key: HTTPCORE-12
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-12
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: Examples
>         Environment: All
>            Reporter: Gabriel Klein
>
> In code
> http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java
> and
> http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java
> You have
>       {
>           .....
>                 if (!connStrategy.keepAlive(response, context)) {
>                     conn.close();
>                 } else {
>                     System.out.println("Connection kept alive...");
>                 }
>             }
>         } finally {
>             conn.close();
>         }   
> The problem is that "conn.close();" is called everytime... even if you "System.out.println("Connection
kept alive...");".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message