Issue #1329 fixed bug in FileLocker
Change-Id: Ide1f4cb2d9f5d6f6ebfb2eed8bac583f0b0e153e Former-commit-id:5f66889a5c
[formerlyebb303ee06
] [formerlyd779a82c5e
] [formerly91a8e56302
[formerlyd779a82c5e
[formerly 695f92db8aa698393bebfb4c2fed0bcf4d9d4efa]]] Former-commit-id:91a8e56302
Former-commit-id: cf7d190ae2b6f26ce5d3b1b3e829d8885e3af0cf [formerly66f472ed37
] Former-commit-id:06004a0e08
This commit is contained in:
parent
cbb92a383b
commit
e8445dbd34
1 changed files with 6 additions and 4 deletions
|
@ -340,10 +340,12 @@ public class FileLocker {
|
|||
gotLock = lockFile.createNewFile()
|
||||
|| ((fileTime = lockFile.lastModified()) > 0 && (System
|
||||
.currentTimeMillis() - fileTime) > MAX_WAIT);
|
||||
try {
|
||||
Thread.sleep(waitInterval);
|
||||
} catch (InterruptedException e) {
|
||||
// Ignore
|
||||
if (!gotLock) {
|
||||
try {
|
||||
Thread.sleep(waitInterval);
|
||||
} catch (InterruptedException e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue