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 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to