Discovery: Only add local node to possibleMasterNodes if it is a master node.
This commit is contained in:
parent
67685cb026
commit
5e38e9eb4f
|
@ -869,7 +869,9 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
|
|||
}
|
||||
|
||||
Set<DiscoveryNode> possibleMasterNodes = Sets.newHashSet();
|
||||
possibleMasterNodes.add(localNode);
|
||||
if (localNode.masterNode()) {
|
||||
possibleMasterNodes.add(localNode);
|
||||
}
|
||||
for (ZenPing.PingResponse pingResponse : pingResponses) {
|
||||
possibleMasterNodes.add(pingResponse.target());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue