ClusterService: improve update thread shutdown logic.
This commit is contained in:
parent
98ce594ac8
commit
674fe9ba28
|
@ -166,12 +166,7 @@ public class InternalClusterService extends AbstractLifecycleComponent<ClusterSe
|
||||||
onGoingTimeout.cancel();
|
onGoingTimeout.cancel();
|
||||||
onGoingTimeout.listener.onClose();
|
onGoingTimeout.listener.onClose();
|
||||||
}
|
}
|
||||||
updateTasksExecutor.shutdown();
|
ThreadPool.terminate(updateTasksExecutor, 10, TimeUnit.SECONDS);
|
||||||
try {
|
|
||||||
updateTasksExecutor.awaitTermination(10, TimeUnit.SECONDS);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
remove(localNodeMasterListeners);
|
remove(localNodeMasterListeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue