disabled or removed sleep calls

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6301 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 342c5d0fd4
commit 700218846c

@ -1011,12 +1011,14 @@ public final class HTTPDFileHandler {
// flush all
try {newOut.flush();}catch (final Exception e) {}
/*
// wait a little time until everything closes so that clients can read from the streams/sockets
if ((contentLength >= 0) && (requestHeader.get(RequestHeader.CONNECTION, "close")).indexOf("keep-alive") == -1) {
// in case that the client knows the size in advance (contentLength present) the waiting will have no effect on the interface performance
// but if the client waits on a connection interruption this will slow down.
try {Thread.sleep(2000);} catch (final InterruptedException e) {} // FIXME: is this necessary?
}
*/
}
// check mime type again using the result array: these are 'magics'

@ -248,7 +248,6 @@ public final class MetadataRepository implements Iterable<byte[]> {
log.logSevere("RuntimeException:", e);
}
}
//try { Thread.sleep(1000); } catch (final InterruptedException e) { }
log.logInfo("URLs vorher: " + urlIndexFile.size() + " Entries loaded during Iteratorloop: " + iteratorCount + " kaputte URLs: " + damagedURLS.size());
final Iterator<String> eiter2 = damagedURLS.iterator();

@ -607,8 +607,6 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
// init robinson cluster
// before we do that, we wait some time until the seed list is loaded.
//while (((System.currentTimeMillis() - startedSeedListAquisition) < 8000) && (this.webIndex.seedDB.sizeConnected() == 0)) try {Thread.sleep(1000);} catch (final InterruptedException e) {}
//try {Thread.sleep(1000);} catch (final InterruptedException e) {}
this.clusterhashes = this.peers.clusterHashes(getConfig("cluster.peers.yacydomain", ""));
// deploy blocking threads
@ -1885,7 +1883,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
// handle access rights
switch (adminAuthenticated(header)) {
case 0: // wrong password given
try { Thread.sleep(3000); } catch (final InterruptedException e) { } // prevent brute-force
//try { Thread.sleep(3000); } catch (final InterruptedException e) { } // prevent brute-force
return false;
case 1: // no password given
return false;

@ -288,7 +288,6 @@ public class yacySearch extends Thread {
count, maxDist, true, targets, targetPeers[i],
indexSegment, peers, crawlResults, containerCache, abstractCache, blacklist, rankingProfile, constraint);
searchThreads[i].start();
//try {Thread.sleep(20);} catch (InterruptedException e) {}
}
return searchThreads;
}

Loading…
Cancel
Save