Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for division by zero
Michael Peter Christen0d69089c61c5
diff --git a/htroot/yacy/hello.java b/htroot/yacy/hello.javaindex e21455a9c..9d4d0d407 100644--- a/htroot/yacy/hello.java+++ b/htroot/yacy/hello.java@@ -155,7 +155,7 @@ public final class hello {ConcurrentLog.info("**hello-DEBUG**", "peer " + remoteSeed.getName() + " challenged us with IPs " + reportedips);int callbackRemain = Math.min(5, reportedips.size());long callbackStart = System.currentTimeMillis();- if (reportedips.size() > 0) {+ if (callbackRemain > 0 && reportedips.size() > 0) {for (String reportedip: reportedips) {int partialtimeout = ((int) (callbackStart + 6500 - System.currentTimeMillis())) / callbackRemain; // bad hack until a concurrent version is implementedif (partialtimeout <= 0) break;