# HG changeset patch # User chegar # Date 1295044471 0 # Node ID ec76fe03fdd41725f25bdb025476e816f6056a8a # Parent d31b7cc371efe780d3af772d4a0b63dc4766427c 7010903: impl. of http.maxConnections is different from the description in JavaSE document Reviewed-by: alanb, michaelm diff -r d31b7cc371ef -r ec76fe03fdd4 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()));