diff options
-rw-r--r-- | synchronizer/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index ff97e6a..edecbb1 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp | |||
@@ -204,7 +204,16 @@ int main(int argc, char *argv[]) | |||
204 | QLockFile lockfile(Sink::resourceStorageLocation(instanceIdentifier) + "/resource.lock"); | 204 | QLockFile lockfile(Sink::resourceStorageLocation(instanceIdentifier) + "/resource.lock"); |
205 | lockfile.setStaleLockTime(500); | 205 | lockfile.setStaleLockTime(500); |
206 | if (!lockfile.tryLock(0)) { | 206 | if (!lockfile.tryLock(0)) { |
207 | SinkWarning() << "Failed to acquire exclusive lock on socket."; | 207 | const auto error = lockfile.error(); |
208 | if (error == QLockFile::LockFailedError) { | ||
209 | qint64 pid; | ||
210 | QString hostname, appname; | ||
211 | lockfile.getLockInfo(&pid, &hostname, &appname); | ||
212 | SinkWarning() << "Failed to acquire exclusive resource lock."; | ||
213 | SinkLog() << "Pid:" << pid << "Host:" << hostname << "App:" << appname; | ||
214 | } else { | ||
215 | SinkError() << "Error while trying to acquire exclusive resource lock: " << error; | ||
216 | } | ||
208 | return -1; | 217 | return -1; |
209 | } | 218 | } |
210 | 219 | ||