mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
Sync-base: don't crash if invalidation queue is corrupted
This commit is contained in:
@@ -36,7 +36,11 @@ public class DeferredInvalidationQueueService implements PeerConnectedEventListe
|
|||||||
Log.info("Initializing with root " + dataRoot);
|
Log.info("Initializing with root " + dataRoot);
|
||||||
if (Paths.get(dataRoot).resolve(dataFileName).toFile().exists()) {
|
if (Paths.get(dataRoot).resolve(dataFileName).toFile().exists()) {
|
||||||
Log.info("Reading invalidation queue");
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user