Skip to content

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

*) fixed existing protection against divbyzero and removed the new one

auron_x06b13650667f
diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.java
index 70b6ccfd4..77a24fba1 100644
--- a/source/de/anomic/yacy/yacyPeerActions.java
+++ b/source/de/anomic/yacy/yacyPeerActions.java
@@ -130,8 +130,8 @@ public class yacyPeerActions {
//set the PPM
seedDB.mySeed.put(yacySeed.ISPEED, Long.toString(Math.round((float)indexedcdiff / ((float)uptimediff/60f))));
}
- if(uptime > 0)
- sb.setConfig("totalPPM", Long.toString(indexedc / (1 + (uptime/60))));
+ if(uptime > 60)
+ sb.setConfig("totalPPM", Long.toString(indexedc / (uptime/60)));
else
sb.setConfig("totalPPM", Long.toString(indexedc / 1)); //no division by zero