From 19112750d9fe3faeab33a67411a8f41f8eda8d5f Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 18 Aug 2018 18:41:34 -0400 Subject: [PATCH] Fix MonitorActivationReason.InactiveServerRebooted always triggering --- src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs index 5618cb91e7..b43720659f 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs @@ -437,8 +437,6 @@ namespace Tgstation.Server.Host.Components.Watchdog monitorState.NextAction = MonitorAction.Break; break; case MonitorActivationReason.InactiveServerRebooted: - //should never happen but okay - logger.LogWarning("Inactive server rebooted, this is a bug in DM code!"); monitorState.RebootingInactiveServer = true; monitorState.InactiveServer.ResetRebootState(); //the DMAPI has already done this internally monitorState.ActiveServer.ClosePortOnReboot = false; @@ -491,7 +489,7 @@ namespace Tgstation.Server.Host.Components.Watchdog var inactiveServerLifetime = monitorState.InactiveServer.Lifetime; var activeServerReboot = monitorState.ActiveServer.OnReboot; var inactiveServerReboot = monitorState.InactiveServer.OnReboot; - var inactiveServerStartup = monitorState.InactiveServer.LaunchResult; + var inactiveServerStartup = monitorState.RebootingInactiveServer ? monitorState.InactiveServer.LaunchResult : null; var activeLaunchParametersChanged = activeParametersUpdated.Task; var newDmbAvailable = dmbFactory.OnNewerDmb;