Always inform new observers about current state

This commit is contained in:
Torsten Grote
2021-06-17 11:55:56 -03:00
parent 77767b45c9
commit c16663b530

View File

@@ -63,8 +63,6 @@ abstract class RemovableDriveTaskImpl implements RemovableDriveTask {
synchronized (lock) {
observers.add(o);
state = this.state;
}
if (state.isFinished()) {
eventExecutor.execute(() -> o.accept(state));
}
}