changeset 3552:983364897f72

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 59e352561146
children d61d9bf190f5
files src/share/classes/sun/net/www/http/KeepAliveCache.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Jan 13 22:21:58 2011 -0800
+++ b/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()));