mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
*) 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
This commit is contained in:
parent
94d7ced900
commit
06b1365066
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user