Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix NPE on continuing crawls after YaCy restart (Agent is then nulll)
reger1600414450be
diff --git a/source/net/yacy/crawler/HostBalancer.java b/source/net/yacy/crawler/HostBalancer.javaindex 1ba50ce8c..29aa2923e 100644--- a/source/net/yacy/crawler/HostBalancer.java+++ b/source/net/yacy/crawler/HostBalancer.java@@ -211,7 +211,8 @@ public class HostBalancer implements Balancer {if (queue == null) {queue = new HostQueue(this.hostsPath, entry.url().getHost(), entry.url().getPort(), this.queues.size() > 100, this.exceed134217727);this.queues.put(hosthash, queue);- robots.ensureExist(entry.url(), profile.getAgent(), true); // concurrently load all robots.txt+ // profile might be null when continue crawls after YaCy restart+ robots.ensureExist(entry.url(), profile == null ? ClientIdentification.yacyInternetCrawlerAgent : profile.getAgent(), true); // concurrently load all robots.txt}return queue.push(entry, profile, robots);}