7010903: impl. of http.maxConnections is different from the description in JavaSE document
authorchegar
Fri, 14 Jan 2011 22:34:31 +0000
changeset 7989 ec76fe03fdd4
parent 7988 d31b7cc371ef
child 7990 57019dc81b66
7010903: impl. of http.maxConnections is different from the description in JavaSE document Reviewed-by: alanb, michaelm
jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java
--- a/jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Jan 13 22:21:58 2011 -0800
+++ b/jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java	Fri Jan 14 22:34:31 2011 +0000
@@ -267,7 +267,7 @@
 
     /* return a still valid, unused HttpClient */
     synchronized void put(HttpClient h) {
-        if (size() > KeepAliveCache.getMaxConnections()) {
+        if (size() >= KeepAliveCache.getMaxConnections()) {
             h.closeServer(); // otherwise the connection remains in limbo
         } else {
             push(new KeepAliveEntry(h, System.currentTimeMillis()));