Index: HttpConnection.java =================================================================== RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v retrieving revision 1.61 diff -u -r1.61 HttpConnection.java --- HttpConnection.java 1 May 2003 01:25:28 -0000 1.61 +++ HttpConnection.java 1 May 2003 02:39:31 -0000 @@ -1069,33 +1069,36 @@ lastResponseInputStream = null; if (null != inputStream) { + InputStream temp = inputStream; + inputStream = null; try { - inputStream.close(); + temp.close(); } catch (Exception ex) { LOG.debug("Exception caught when closing input", ex); // ignored } - inputStream = null; } if (null != outputStream) { + OutputStream temp = outputStream; + outputStream = null; try { - outputStream.close(); + temp.close(); } catch (Exception ex) { LOG.debug("Exception caught when closing output", ex); // ignored } - outputStream = null; } if (null != socket) { + Socket temp = socket; + socket = null; try { - socket.close(); + temp.close(); } catch (Exception ex) { LOG.debug("Exception caught when closing socket", ex); // ignored } - socket = null; } isOpen = false; tunnelEstablished = false;