don't send leave request when the master node is null
This commit is contained in:
parent
84fa13a5e0
commit
ccdbbef276
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue