Merge "When renaming the lock file succeeds the lock isn't held anymore"
This commit is contained in:
commit
4796fe7043
|
@ -437,11 +437,16 @@ public boolean commit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveStatInformation();
|
saveStatInformation();
|
||||||
if (lck.renameTo(ref))
|
if (lck.renameTo(ref)) {
|
||||||
|
haveLck = false;
|
||||||
return true;
|
return true;
|
||||||
if (!ref.exists() || deleteRef())
|
}
|
||||||
if (renameLock())
|
if (!ref.exists() || deleteRef()) {
|
||||||
|
if (renameLock()) {
|
||||||
|
haveLck = false;
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
unlock();
|
unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue