hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r498133 - /jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/MultiThreadedHttpConnectionManager.java
Date Sat, 20 Jan 2007 16:01:59 GMT
Author: rolandw
Date: Sat Jan 20 08:01:58 2007
New Revision: 498133

URL: http://svn.apache.org/viewvc?view=rev&rev=498133
Log:
HTTPCLIENT-622 with minor modifications

Modified:
    jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/MultiThreadedHttpConnectionManager.java

Modified: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/MultiThreadedHttpConnectionManager.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/MultiThreadedHttpConnectionManager.java?view=diff&rev=498133&r1=498132&r2=498133
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/MultiThreadedHttpConnectionManager.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/MultiThreadedHttpConnectionManager.java
Sat Jan 20 08:01:58 2007
@@ -610,6 +610,8 @@
         public synchronized void handleLostConnection(HostConfiguration config) {
             HostConnectionPool hostPool = getHostPool(config);
             hostPool.numConnections--;
+            if (hostPool.numConnections < 1)
+                mapHosts.remove(config);
 
             numConnections--;
             notifyWaitingThread(config);
@@ -715,6 +717,8 @@
             hostPool.freeConnections.remove(connection);
             hostPool.numConnections--;
             numConnections--;
+            if (hostPool.numConnections < 1)
+                mapHosts.remove(connectionConfiguration);
 
             // remove the connection from the timeout handler
             idleConnectionHandler.remove(connection);            



Mime
View raw message