don't send leave request when the master node is null

This commit is contained in:
kimchy 2011-01-03 12:01:33 +02:00
parent 84fa13a5e0
commit ccdbbef276
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
nodesFD.stop(); nodesFD.stop();
initialStateSent.set(false); initialStateSent.set(false);
if (sendLeaveRequest) { if (sendLeaveRequest) {
if (!master) { if (!master && latestDiscoNodes.masterNode() != null) {
try { try {
membership.sendLeaveRequestBlocking(latestDiscoNodes.masterNode(), localNode, TimeValue.timeValueSeconds(1)); membership.sendLeaveRequestBlocking(latestDiscoNodes.masterNode(), localNode, TimeValue.timeValueSeconds(1));
} catch (Exception e) { } catch (Exception e) {