Clarify closing of timeout listeners
This commit is contained in:
parent
1f12beea9a
commit
8b970d970d
|
@ -219,8 +219,12 @@ public class ClusterService extends AbstractLifecycleComponent<ClusterService> {
|
|||
}
|
||||
}
|
||||
ThreadPool.terminate(updateTasksExecutor, 10, TimeUnit.SECONDS);
|
||||
postAppliedListeners.stream().filter(listener -> listener instanceof TimeoutClusterStateListener)
|
||||
.forEach(listener -> ((TimeoutClusterStateListener) listener).onClose());
|
||||
// close timeout listeners that did not have an ongoing timeout
|
||||
postAppliedListeners
|
||||
.stream()
|
||||
.filter(listener -> listener instanceof TimeoutClusterStateListener)
|
||||
.map(listener -> (TimeoutClusterStateListener)listener)
|
||||
.forEach(TimeoutClusterStateListener::onClose);
|
||||
remove(localNodeMasterListeners);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue