aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/main.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-22 10:37:08 +0200
committerGitHub Enterprise <[email protected]>2024-08-22 10:37:08 +0200
commit9ce07726a982259439bb50f40954c0831fe5b916 (patch)
tree6a21876ea5b951a7d90a2beb67b3a20094fbc433 /src/zenserver/main.cpp
parentremove bad assert when payload is memcached but metadata is not set (#130) (diff)
downloadzen-9ce07726a982259439bb50f40954c0831fe5b916.tar.xz
zen-9ce07726a982259439bb50f40954c0831fe5b916.zip
if a zenserver is already using our named mutex - exit with error code instead of reporting error to Sentry (#132)
Diffstat (limited to 'src/zenserver/main.cpp')
-rw-r--r--src/zenserver/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenserver/main.cpp b/src/zenserver/main.cpp
index e6ecc3ce2..93516f5fd 100644
--- a/src/zenserver/main.cpp
+++ b/src/zenserver/main.cpp
@@ -208,6 +208,11 @@ ZenEntryPoint::Run()
auto ServerCleanup = MakeGuard([&Server] { Server.Cleanup(); });
int EffectiveBasePort = Server.Initialize(m_ServerOptions, Entry);
+ if (EffectiveBasePort == -1)
+ {
+ // Server.Initialize has already logged what the issue is - just exit with failure code here.
+ std::exit(1);
+ }
Entry->EffectiveListenPort = uint16_t(EffectiveBasePort);
if (EffectiveBasePort != m_ServerOptions.BasePort)