fix NPE in autolocker, when reading "lastActivity" before any activity happened

This commit is contained in:
Sebastian Stenzel
2021-06-04 09:40:23 +02:00
parent 95b98b8a36
commit c8fa7f1edd

View File

@@ -58,7 +58,10 @@ public class VaultStats {
if (VaultState.Value.UNLOCKED == state.get()) {
assert fs.get() != null;
LOG.debug("start recording stats");
Platform.runLater(() -> updateService.restart());
Platform.runLater(() -> {
lastActivity.set(Instant.now());
updateService.restart();
});
} else {
LOG.debug("stop recording stats");
Platform.runLater(() -> updateService.cancel());