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);
|
ThreadPool.terminate(updateTasksExecutor, 10, TimeUnit.SECONDS);
|
||||||
postAppliedListeners.stream().filter(listener -> listener instanceof TimeoutClusterStateListener)
|
// close timeout listeners that did not have an ongoing timeout
|
||||||
.forEach(listener -> ((TimeoutClusterStateListener) listener).onClose());
|
postAppliedListeners
|
||||||
|
.stream()
|
||||||
|
.filter(listener -> listener instanceof TimeoutClusterStateListener)
|
||||||
|
.map(listener -> (TimeoutClusterStateListener)listener)
|
||||||
|
.forEach(TimeoutClusterStateListener::onClose);
|
||||||
remove(localNodeMasterListeners);
|
remove(localNodeMasterListeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue