mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Fix save race condition
This commit is contained in:
parent
2310515a4c
commit
53926a2830
1 changed files with 3 additions and 2 deletions
|
@ -303,11 +303,12 @@ public class StandardStorage extends DataStorage {
|
|||
}
|
||||
|
||||
public void save(boolean dispose) {
|
||||
if (!loaded || disposed) {
|
||||
if (!busyIo.tryLock()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!busyIo.tryLock()) {
|
||||
if (!loaded || disposed) {
|
||||
busyIo.unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue