HOTFIX: persistent data not writing to file when stopping

This commit is contained in:
ChomeNS
2024-12-02 18:04:28 +07:00
parent 89dc2e2781
commit c1be374457
2 changed files with 5 additions and 4 deletions

View File

@@ -42,8 +42,9 @@ public class PersistentDataUtilities {
}
}
private static synchronized void writeToFile() {
if (stopping) return;
private static synchronized void writeToFile () { writeToFile(false); }
private static synchronized void writeToFile (boolean force) {
if (stopping && !force) return;
lock.lock();
@@ -62,7 +63,7 @@ public class PersistentDataUtilities {
lock.lock();
try {
writeToFile();
writeToFile(true);
} finally {
lock.unlock();
}