changeset 7989:ec76fe03fdd4

7010903: impl. of http.maxConnections is different from the description in JavaSE document Reviewed-by: alanb, michaelm
author chegar
date Fri, 14 Jan 2011 22:34:31 +0000
parents d31b7cc371ef
children 57019dc81b66
files jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()));