Fix BaseServer.Shutdown bug when not specifying a reason.

If a shutdown was requested before the main loop had been started, it would only work if the reason was non-null. This is because `string? _shutdownReason` essentially acts as a shutdown request flag with its nullability.
This commit is contained in:
Vera Aguilera Puerto
2022-03-03 15:41:44 +01:00
parent fa1de04df7
commit 5e977da9bc

View File

@@ -126,7 +126,7 @@ namespace Robust.Server
else
Logger.InfoS("srv", $"{reason}, shutting down...");
_shutdownReason = reason;
_shutdownReason = reason ?? "Shutting down";
if (_mainLoop != null) _mainLoop.Running = false;
if (_logHandler != null)