aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver/main.cpp')
-rw-r--r--src/zenserver/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/zenserver/main.cpp b/src/zenserver/main.cpp
index 01e142801..b4cb2464b 100644
--- a/src/zenserver/main.cpp
+++ b/src/zenserver/main.cpp
@@ -145,9 +145,15 @@ ZenEntryPoint::Run()
if (Ec)
{
- ZEN_WARN("ERROR: Unable to grab lock at '{}' (error: '{}')", LockFilePath, Ec.message());
+ ZEN_WARN("Unable to grab lock at '{}' (error: '{}'), retrying", LockFilePath, Ec.message());
+ Sleep(500);
- std::exit(99);
+ m_LockFile.Create(LockFilePath, MakeLockData(), Ec);
+ if (Ec)
+ {
+ ZEN_WARN("ERROR: Unable to grab lock at '{}' (error: '{}')", LockFilePath, Ec.message());
+ std::exit(99);
+ }
}
InitializeServerLogging(m_ServerOptions);