From 06b13650667fdf387a53f6556ce075655500a855 Mon Sep 17 00:00:00 2001 From: auron_x Date: Fri, 8 Sep 2006 23:43:30 +0000 Subject: [PATCH] *) fixed existing protection against divbyzero and removed the new one git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2530 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/yacy/yacyPeerActions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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