From d1083a69131ff4541ff61b58fda503e2288847ed Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 28 Jun 2009 10:35:12 +0000 Subject: [PATCH] maybe we have less problems with open connections to the server if we don't do BF forced sleeps (just a test) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6149 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/server/serverCore.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java index 827a09931..506a44bcb 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -342,6 +342,7 @@ public final class serverCore extends serverAbstractBusyThread implements server final String cIP = clientAddress(controlSocket); //System.out.println("server bfHosts=" + bfHost.toString()); + /* if (bfHost.get(cIP) != null) { Integer attempts = bfHost.get(cIP); if (attempts == null) attempts = Integer.valueOf(1); else attempts = Integer.valueOf(attempts.intValue() + 1); @@ -349,12 +350,13 @@ public final class serverCore extends serverAbstractBusyThread implements server this.log.logWarning("SLOWING DOWN ACCESS FOR BRUTE-FORCE PREVENTION FROM " + cIP + ", ATTEMPT " + attempts.intValue()); // add a delay to make brute-force harder announceThreadBlockApply(); - try {Thread.sleep(attempts.intValue() /*BFPATCH*/);} catch (final InterruptedException e) {} + try {Thread.sleep(attempts.intValue());} catch (final InterruptedException e) {} announceThreadBlockRelease(); if ((attempts.intValue() >= 10) && (this.denyHost != null)) { this.denyHost.put(cIP, "deny"); } } + */ if ((this.denyHost == null) || (this.denyHost.get(cIP) == null)) { // setting the timeout properly