Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- reduced peer-ping time-out from 30 to 10 seconds - no re-try for the peer ping any more (it's a test, let's see what happens)

orbiter989819a28c28
diff --git a/source/de/anomic/yacy/yacyClient.java b/source/de/anomic/yacy/yacyClient.java
index a33536c20..14a3e6c26 100644
--- a/source/de/anomic/yacy/yacyClient.java
+++ b/source/de/anomic/yacy/yacyClient.java
@@ -140,22 +140,21 @@ public final class yacyClient {
Map<String, String> result = null;
final String salt = crypt.randomSalt();
final List<Part> post = yacyNetwork.basicRequestPost(Switchboard.getSwitchboard(), null, salt);
- for (int retry = 0; retry < 4; retry++) try {
+ try {
// generate request
post.add(new DefaultCharsetStringPart("count", "20"));
post.add(new DefaultCharsetStringPart("seed", mySeed.genSeedStr(salt)));
// send request
final long start = System.currentTimeMillis();
- final byte[] content = HttpConnector.wput("http://" + address + "/yacy/hello.html", yacySeed.b64Hash2hexHash(otherHash) + ".yacyh", post, 30000, false);
+ final byte[] content = HttpConnector.wput("http://" + address + "/yacy/hello.html", yacySeed.b64Hash2hexHash(otherHash) + ".yacyh", post, 10000, false);
yacyCore.log.logInfo("yacyClient.publishMySeed thread '" + Thread.currentThread().getName() + "' contacted peer at " + address + ", received " + ((content == null) ? "null" : content.length) + " bytes, time = " + (System.currentTimeMillis() - start) + " milliseconds");
result = FileUtils.table(content);
- break;
} catch (final Exception e) {
if (Thread.currentThread().isInterrupted()) {
yacyCore.log.logInfo("yacyClient.publishMySeed thread '" + Thread.currentThread().getName() + "' interrupted.");
return -1;
}
- yacyCore.log.logInfo("yacyClient.publishMySeed thread '" + Thread.currentThread().getName() + "', peer " + address + "; exception: " + e.getMessage() + "; retry = " + retry);
+ yacyCore.log.logInfo("yacyClient.publishMySeed thread '" + Thread.currentThread().getName() + "', peer " + address + "; exception: " + e.getMessage());
// try again (go into loop)
result = null;
}