Merge "Issue #1329 fixed bug in FileLocker" into development
Former-commit-id:42b24aa97f
[formerly27a96cf383
] [formerly42b24aa97f
[formerly27a96cf383
] [formerlyf77cf10fea
[formerly 079e2ac290f6d914b103be4ebec0420c2f9f0a93]]] Former-commit-id:f77cf10fea
Former-commit-id:efb750cc67
[formerlyf160900fe5
] Former-commit-id:4a020340ee
This commit is contained in:
commit
b56796d0ac
1 changed files with 6 additions and 4 deletions
|
@ -340,10 +340,12 @@ public class FileLocker {
|
||||||
gotLock = lockFile.createNewFile()
|
gotLock = lockFile.createNewFile()
|
||||||
|| ((fileTime = lockFile.lastModified()) > 0 && (System
|
|| ((fileTime = lockFile.lastModified()) > 0 && (System
|
||||||
.currentTimeMillis() - fileTime) > MAX_WAIT);
|
.currentTimeMillis() - fileTime) > MAX_WAIT);
|
||||||
try {
|
if (!gotLock) {
|
||||||
Thread.sleep(waitInterval);
|
try {
|
||||||
} catch (InterruptedException e) {
|
Thread.sleep(waitInterval);
|
||||||
// Ignore
|
} catch (InterruptedException e) {
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue