From ccf9c9a64e4905be91c6a8ef2c7d5d29c58b06fb Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 10 Aug 2015 00:49:44 +0200 Subject: Set stale lock time. We're trying to protect against race conditions, a lock time off 500ms should suffice and means we can recover automatically after a crash. --- synchronizer/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synchronizer') diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index 2b0cfe3..db74960 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) const QByteArray instanceIdentifier = argv[1]; QLockFile lockfile(instanceIdentifier + ".lock"); - lockfile.setStaleLockTime(0); + lockfile.setStaleLockTime(500); if (!lockfile.tryLock(0)) { Warning() << "Failed to acquire exclusive lock on socket."; return -1; -- cgit v1.2.3