Skip to content

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

do not block server session if maximum number of sessions is reached, just try to clean up once

orbiter1da5241c2ddb
diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java
index 1a8c7b331..a151c2428 100644
--- a/source/de/anomic/server/serverCore.java
+++ b/source/de/anomic/server/serverCore.java
@@ -319,15 +319,15 @@ public final class serverCore extends AbstractBusyThread implements BusyThread {
announceThreadBlockRelease();
- int pp, trycount = 0;
- while ((pp = getJobCount()) >= this.maxBusySessions) {
+ int pp/*, trycount = 0*/;
+ if ((pp = getJobCount()) >= this.maxBusySessions) {
terminateOldSessions(3000);
this.log.logInfo("termination of old sessions: before = " + pp + ", after = " + getJobCount());
- if (getJobCount() < this.maxBusySessions) break;
- if (trycount++ > 5) break;
- Thread.sleep(1000); // lets try again after a short break
+ //if (getJobCount() < this.maxBusySessions) break;
+ //if (trycount++ > 5) break;
+ //Thread.sleep(1000); // lets try again after a short break
}
-
+ /*
if (getJobCount() >= this.maxBusySessions) {
// immediately close connection if too much sessions are still running
this.log.logWarning("* connections (" + getJobCount() + ") exceeding limit (" + this.maxBusySessions + ")" + ", closing new incoming connection from "+ controlSocket.getRemoteSocketAddress());
@@ -336,6 +336,7 @@ public final class serverCore extends AbstractBusyThread implements BusyThread {
return false;
}
+ */
final String cIP = clientAddress(controlSocket);
//System.out.println("server bfHosts=" + bfHost.toString());