Skip to content

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

Fix for http://forum.yacy-websuche.de/viewtopic.php?f=5&t=2204

hermens62a7341c4d08
diff --git a/source/de/anomic/crawler/Balancer.java b/source/de/anomic/crawler/Balancer.java
index 609d2cd15..2461ec4ac 100644
--- a/source/de/anomic/crawler/Balancer.java
+++ b/source/de/anomic/crawler/Balancer.java
@@ -390,7 +390,7 @@ public class Balancer {
rest = rest + 3000 * loops;
loops = 0;
}
- try {synchronized(this) { this.wait(rest); }} catch (final InterruptedException e) {}
+ if (rest > 0) {try {synchronized(this) { this.wait(rest); }} catch (final InterruptedException e) {}}
for (int i = 0; i < loops; i++) {
Log.logInfo("BALANCER", "waiting for " + crawlEntry.url().getHost() + ": " + ((loops - i) * 3) + " seconds remaining...");
try {synchronized(this) { this.wait(3000); }} catch (final InterruptedException e) {}