diff options
Diffstat (limited to 'lib/common/NamedLock.cpp')
-rw-r--r-- | lib/common/NamedLock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/common/NamedLock.cpp b/lib/common/NamedLock.cpp index 18ef1edf..8cacf065 100644 --- a/lib/common/NamedLock.cpp +++ b/lib/common/NamedLock.cpp @@ -236,6 +236,9 @@ void NamedLock::ReleaseLock() CommonException, OSFileError); } + // Mark as unlocked, so we don't try to close it again if the unlink() fails. + mFileDescriptor = -1; + #ifdef WIN32 // On Windows we need to close the file before deleting it, otherwise // the system won't let us delete it. @@ -248,9 +251,6 @@ void NamedLock::ReleaseLock() } #endif // WIN32 - // Mark as unlocked, so we don't try to close it again if the unlink() fails. - mFileDescriptor = -1; - BOX_TRACE("Released lock and deleted lockfile " << mFileName); } |