Skip to content

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

fixed timing problem causing a division by zero exception

orbiterd2bb3f442e5b
diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.java
index 20bc5be89..6eebfe0a9 100644
--- a/source/de/anomic/yacy/yacyPeerActions.java
+++ b/source/de/anomic/yacy/yacyPeerActions.java
@@ -125,7 +125,7 @@ public class yacyPeerActions {
//set the PPM
seedDB.mySeed.put(yacySeed.ISPEED, Long.toString(indexedcdiff / uptimediff));
}
- sb.setConfig("totalPPM", Long.toString(indexedc / uptime));
+ sb.setConfig("totalPPM", Long.toString(indexedc / (uptime + 1)));
seedDB.mySeed.put(yacySeed.UPTIME, Long.toString(uptime)); // the number of minutes that the peer is up in minutes/day (moving average MA30)
seedDB.mySeed.put(yacySeed.LCOUNT, Integer.toString(sb.urlPool.loadedURL.size())); // the number of links that the peer has stored (LURL's)