Always inform new observers about current state

This commit is contained in:
Torsten Grote
2021-06-17 11:55:56 -03:00
parent 4c327e9874
commit fe1c384aeb

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));
}
}