diff options
Diffstat (limited to 'src/zenserver/main.cpp')
| -rw-r--r-- | src/zenserver/main.cpp | 5 |
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) |