set RootNodeFlag only if EmbeddedSolr is connected (as RootNodes may receive direct Solr queries)

This commit is contained in:
reger 2013-03-12 03:13:14 +01:00
parent 2962f2b9e9
commit 38f46eb33d

View File

@ -284,7 +284,8 @@ public final class Protocol {
} else { } else {
final String myIP = result.get("yourip"); final String myIP = result.get("yourip");
final String properIP = Seed.isProperIP(myIP); final String properIP = Seed.isProperIP(myIP);
mySeed.setFlagRootNode((mytype.equals(Seed.PEERTYPE_SENIOR) || mytype.equals(Seed.PEERTYPE_PRINCIPAL)) && responseTime < 1000 && Domains.isThisHostIP(myIP)); mySeed.setFlagRootNode((mytype.equals(Seed.PEERTYPE_SENIOR) || mytype.equals(Seed.PEERTYPE_PRINCIPAL)) && responseTime < 1000 && Domains.isThisHostIP(myIP) &&
Switchboard.getSwitchboard().index.fulltext().connectedLocalSolr()); // RootNode may receive direct Solr queries, set flag only if available
if ( properIP == null ) { if ( properIP == null ) {
mySeed.setIP(myIP); mySeed.setIP(myIP);
} }
@ -1754,4 +1755,4 @@ public final class Protocol {
return parts; return parts;
} }
} }