fix for long transfer pauses

see http://www.yacy-forum.de/viewtopic.php?p=35243#35243

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3672 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent b25bc6c36d
commit d6480dc670

@ -200,7 +200,7 @@ public final class transferRWI {
result = "ok"; result = "ok";
if (checkLimit) { if (checkLimit) {
pause = (sb.wordIndex.dhtInCacheSize() < 500) ? 0 : 60 * sb.wordIndex.dhtInCacheSize(); // estimation of necessary pause time pause = (sb.wordIndex.dhtInCacheSize() < 500) ? 0 : sb.wordIndex.dhtInCacheSize(); // estimation of necessary pause time
} }
} }

@ -260,8 +260,8 @@ public class plasmaDHTTransfer extends Thread {
if (transferRWIResult != null && transferRWIResult.containsKey("pause")) { if (transferRWIResult != null && transferRWIResult.containsKey("pause")) {
String pauseStr = (String) transferRWIResult.get("pause"); String pauseStr = (String) transferRWIResult.get("pause");
try { pause = Integer.valueOf(pauseStr).intValue(); } catch (NumberFormatException numEx){} try { pause = Integer.valueOf(pauseStr).intValue(); } catch (NumberFormatException numEx){}
if (pause < 0) pause = 60000; if (pause < 0) pause = 5000;
else if (pause > 1800000) pause = 1800000; else if (pause > 30000) pause = 30000;
} }
return pause; return pause;
} }

Loading…
Cancel
Save