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/08 02:33:31 UTC

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

mbecke      2003/09/07 17:33:31

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH HttpConnection.java
  Log:
  Switched the order in which socket streams are closed.
  PR: 22941
  Submitted by: Michael Becke
  Reviewed by: Oleg Kalnichevski
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.67.2.3  +12 -12    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.67.2.2
  retrieving revision 1.67.2.3
  diff -u -r1.67.2.2 -r1.67.2.3
  --- HttpConnection.java	31 Jul 2003 17:59:17 -0000	1.67.2.2
  +++ HttpConnection.java	8 Sep 2003 00:33:31 -0000	1.67.2.3
  @@ -1133,24 +1133,24 @@
           // no longer care about previous responses...
           lastResponseInputStream = null;
   
  -        if (null != inputStream) {
  -            InputStream temp = inputStream;
  -            inputStream = null;
  +        if (null != outputStream) {
  +            OutputStream temp = outputStream;
  +            outputStream = null;
               try {
                   temp.close();
               } catch (Exception ex) {
  -                LOG.debug("Exception caught when closing input", ex);
  +                LOG.debug("Exception caught when closing output", ex);
                   // ignored
               }
           }
   
  -        if (null != outputStream) {
  -            OutputStream temp = outputStream;
  -            outputStream = null;
  +        if (null != inputStream) {
  +            InputStream temp = inputStream;
  +            inputStream = null;
               try {
                   temp.close();
               } catch (Exception ex) {
  -                LOG.debug("Exception caught when closing output", ex);
  +                LOG.debug("Exception caught when closing input", ex);
                   // ignored
               }
           }