Hi,

If we reused a connection from the HTTPConnection.Pool we forgot to
actually remove that connection from the pool itself. That could lead to
the connection being closed by the Reaper when it was used, or if it was
returned to the pool it would be inserted in the LinkedList twice which
meant we could be returning the same connection (or an already closed
connection). Fixed as follows:

2006-03-04  Mark Wielaard  <[EMAIL PROTECTED]>

    * gnu/java/net/protocol/http/HTTPConnection.java (Pool.get): Remove
    existing connection from pool before returning.

This should solve the issue Christian was seeing.

Committed,

Mark
Index: gnu/java/net/protocol/http/HTTPConnection.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/HTTPConnection.java,v
retrieving revision 1.12
diff -u -r1.12 HTTPConnection.java
--- gnu/java/net/protocol/http/HTTPConnection.java	2 Mar 2006 00:26:57 -0000	1.12
+++ gnu/java/net/protocol/http/HTTPConnection.java	4 Mar 2006 20:52:53 -0000
@@ -488,6 +488,7 @@
           if (matches(cc, host, port, secure))
             {
               c = cc;
+              it.remove();
               break;
             }
         }

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to