From dda24fcb85d29d755f67b54d17cb8b2355e3975e Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 9 Feb 2007 09:55:21 +0000 Subject: [PATCH] ups git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3355 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCrawlBalancer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.java index f2b64c3b8..aa96ba4d1 100644 --- a/source/de/anomic/plasma/plasmaCrawlBalancer.java +++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java @@ -155,12 +155,12 @@ public class plasmaCrawlBalancer { if (lastAccess != null) { // this is not the first access of the same domain long la = lastAccess.longValue(); - if (System.currentTimeMillis() - la > minimumDelta) { + if (System.currentTimeMillis() - la < minimumDelta) { // force a busy waiting here // in best case, this should never happen if the balancer works propertly // this is only to protect against the worst case, where the crawler could // behave in a DoS-manner - long sleeptime = System.currentTimeMillis() - la - minimumDelta; + long sleeptime = minimumDelta - (System.currentTimeMillis() - la); if (sleeptime > 0) try {this.wait(sleeptime);} catch (InterruptedException e) {} } }