You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by mb...@apache.org on 2003/09/03 04:17:50 UTC

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpMethodBase.java

mbecke      2003/09/02 19:17:50

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
  Log:
  Fixes connection release when responseStream.close() throws an exception.
  PR: 22841
  Submitted by: Michael Becke
  Reviewed by: Ortwin Gl�ck
  
  Revision  Changes    Path
  1.178     +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.177
  retrieving revision 1.178
  diff -u -r1.177 -r1.178
  --- HttpMethodBase.java	12 Aug 2003 02:55:22 -0000	1.177
  +++ HttpMethodBase.java	3 Sep 2003 02:17:49 -0000	1.178
  @@ -1075,7 +1075,8 @@
                   // FYI - this may indirectly invoke responseBodyConsumed.
                   responseStream.close();
               } catch (IOException e) {
  -                // attempting cleanup, don't care about exception.
  +                // the connection may not have been released, let's make sure
  +                ensureConnectionRelease();
               }
           } else {
               // Make sure the connection has been released. If the response