Discovery: Only add local node to possibleMasterNodes if it is a master node.

This commit is contained in:
Martijn van Groningen 2014-07-17 22:49:08 +02:00 committed by Boaz Leskes
parent 67685cb026
commit 5e38e9eb4f
1 changed files with 3 additions and 1 deletions

View File

@ -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());
}