Skip to content

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

Merge branch 'master' of ssh://[email protected]/yacy/rc1.git

Michael Peter Christen883622306ee4
diff --cc source/net/yacy/peers/Protocol.java
index 416358346,44d73a6b6..2a7104c2b
--- a/source/net/yacy/peers/Protocol.java
+++ b/source/net/yacy/peers/Protocol.java
@@@ -502,35 -501,33 +502,36 @@@ public final class Protocol
// duetime : maximum time that a peer should spent to create a result
final long timestamp = System.currentTimeMillis();
-- event.addExpectedRemoteReferences(count);
- SearchResult result;
- String ip = target.getIP();
- String clusteraddress = target.getPublicAddress(ip);
- if (target.clash(event.peers.mySeed().getIPs())) clusteraddress = "localhost:" + event.peers.mySeed().getPort();
- try {
- result =
- new SearchResult(
- event,
- basicRequestParts(Switchboard.getSwitchboard(), target.hash, crypt.randomSalt()),
- wordhashes,
- excludehashes,
- "",
- language,
- contentdom,
- count,
- time,
- maxDistance,
- partitions,
- target.getHexHash() + ".yacyh",
- clusteraddress,
- secondarySearchSuperviser
- );
- } catch (final IOException e ) {
- Network.log.info("SEARCH failed, Peer: " + target.hash + ":" + target.getName() + " (" + e.getMessage() + ")");
- event.peers.peerActions.interfaceDeparture(target, ip);
- return -1;
++ event.addExpectedRemoteReferences(count);
+ SearchResult result = null;
+ for (String ip: target.getIPs()) {
- if (ip.indexOf(':') >= 0) System.out.println("Search target: IPv6: " + ip);
++ //if (ip.indexOf(':') >= 0) System.out.println("Search target: IPv6: " + ip);
+ String clusteraddress = target.getPublicAddress(ip);
+ if (target.clash(event.peers.mySeed().getIPs())) clusteraddress = "localhost:" + event.peers.mySeed().getPort();
+ try {
+ result =
+ new SearchResult(
+ event,
+ basicRequestParts(Switchboard.getSwitchboard(), target.hash, crypt.randomSalt()),
+ wordhashes,
+ excludehashes,
+ "",
+ language,
+ contentdom,
+ count,
+ time,
+ maxDistance,
+ partitions,
+ target.getHexHash() + ".yacyh",
+ clusteraddress,
+ secondarySearchSuperviser
+ );
+ } catch (final IOException e ) {
+ Network.log.info("SEARCH failed, Peer: " + target.hash + ":" + target.getName() + " (" + e.getMessage() + ")");
+ event.peers.peerActions.interfaceDeparture(target, ip);
+ return -1;
+ }
++
}
// computation time
final long totalrequesttime = System.currentTimeMillis() - timestamp;