Sync-base: don't crash if invalidation queue is corrupted

This commit is contained in:
2025-04-22 21:38:15 +02:00
parent 4e0675940e
commit ac68208b1a

View File

@@ -36,7 +36,11 @@ public class DeferredInvalidationQueueService implements PeerConnectedEventListe
Log.info("Initializing with root " + dataRoot);
if (Paths.get(dataRoot).resolve(dataFileName).toFile().exists()) {
Log.info("Reading invalidation queue");
_persistentData = SerializationHelper.deserialize(Files.readAllBytes(Paths.get(dataRoot).resolve(dataFileName)));
try {
_persistentData = SerializationHelper.deserialize(Files.readAllBytes(Paths.get(dataRoot).resolve(dataFileName)));
} catch (Exception e) {
Log.error("Error reading invalidation queue", e);
}
}
}