If the server exits with code 0, don't call it a crash

This commit is contained in:
Jordan Dominion
2023-12-27 08:32:59 -05:00
parent bbb5efe32d
commit 36667aecf5
@@ -113,7 +113,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
switch (reason)
{
case MonitorActivationReason.ActiveServerCrashed:
var eventType = controller.TerminationWasRequested
var eventType = controller.TerminationWasRequested || (await controller.Lifetime) == 0
? EventType.WorldEndProcess
: EventType.WatchdogCrash;
await HandleEventImpl(eventType, Enumerable.Empty<string>(), false, cancellationToken);