7010903: impl. of http.maxConnections is different from the description in JavaSE document
Reviewed-by: alanb, michaelm
--- 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()));