Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix display and limit of max server connections after startup (on restart value returned to default=50) This has no effect on Jetty but the limit is still respected.

regerc1dcc8c4566c
diff --git a/source/net/yacy/yacy.java b/source/net/yacy/yacy.java
index 5370f0499..b823366c3 100644
--- a/source/net/yacy/yacy.java
+++ b/source/net/yacy/yacy.java
@@ -63,6 +63,7 @@ import com.google.common.io.Files;
import net.yacy.cora.document.id.DigestURL;
import net.yacy.cora.federate.yacy.CacheStrategy;
import net.yacy.cora.order.Digest;
+import net.yacy.cora.protocol.ConnectionInfo;
import net.yacy.crawler.retrieval.Response;
import net.yacy.server.serverSwitch;
@@ -299,6 +300,9 @@ public final class yacy {
httpServer = new Jetty9HttpServerImpl(port);
httpServer.startupServer();
sb.setHttpServer(httpServer);
+ // TODO: this has no effect on Jetty (but needed to reflect configured value and limit is still used)
+ ConnectionInfo.setServerMaxcount(sb.getConfigInt("connectionsMax", ConnectionInfo.getMaxcount()));
+
ConcurrentLog.info("STARTUP",httpServer.getVersion());
// open the browser window