fix for latest commit

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7145 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 6e4653cf50
commit 2e75879504

@ -146,7 +146,6 @@ public final class search {
// check the search tracker // check the search tracker
TreeSet<Long> trackerHandles = sb.remoteSearchTracker.get(client); TreeSet<Long> trackerHandles = sb.remoteSearchTracker.get(client);
if (!Domains.isLocal(client)) {
if (trackerHandles == null) trackerHandles = new TreeSet<Long>(); if (trackerHandles == null) trackerHandles = new TreeSet<Long>();
boolean block = false; boolean block = false;
synchronized (trackerHandles) { synchronized (trackerHandles) {
@ -160,6 +159,7 @@ public final class search {
block = true; block = true;
} }
} }
if (block && Domains.isLocal(client)) block = false;
if (block) { if (block) {
prop.put("links", ""); prop.put("links", "");
prop.put("linkcount", "0"); prop.put("linkcount", "0");
@ -167,7 +167,6 @@ public final class search {
prop.put("searchtime", "0"); prop.put("searchtime", "0");
return prop; return prop;
} }
}
// tell all threads to do nothing for a specific time // tell all threads to do nothing for a specific time
sb.intermissionAllThreads(100); sb.intermissionAllThreads(100);
@ -386,7 +385,7 @@ public final class search {
prop.put("fwrec", ""); // peers that would have helped to construct this result (recommendations) prop.put("fwrec", ""); // peers that would have helped to construct this result (recommendations)
// prepare search statistics // prepare search statistics
theQuery.remotepeer = sb.peers.lookupByIP(natLib.getInetAddress(client), true, false, false); theQuery.remotepeer = client == null ? null : sb.peers.lookupByIP(natLib.getInetAddress(client), true, false, false);
theQuery.resultcount = (theSearch == null) ? 0 : theSearch.getRankingResult().getLocalIndexCount() + theSearch.getRankingResult().getRemoteResourceSize(); theQuery.resultcount = (theSearch == null) ? 0 : theSearch.getRankingResult().getLocalIndexCount() + theSearch.getRankingResult().getRemoteResourceSize();
theQuery.searchtime = System.currentTimeMillis() - timestamp; theQuery.searchtime = System.currentTimeMillis() - timestamp;
theQuery.urlretrievaltime = (theSearch == null) ? 0 : theSearch.result().getURLRetrievalTime(); theQuery.urlretrievaltime = (theSearch == null) ? 0 : theSearch.result().getURLRetrievalTime();

Loading…
Cancel
Save