diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs index ecfd994cd4..893591612c 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs @@ -147,6 +147,11 @@ namespace Tgstation.Server.Host.Components.Watchdog /// bool running; + /// + /// If the has been d. + /// + bool disposed; + /// /// Initializes a new instance of the . /// @@ -216,6 +221,7 @@ namespace Tgstation.Server.Host.Components.Watchdog restartRegistration.Dispose(); DisposeAndNullControllers(); monitorCts?.Dispose(); + disposed = true; } /// @@ -672,7 +678,9 @@ namespace Tgstation.Server.Host.Components.Watchdog false, cancellationToken); - if (monitorState.NextAction != MonitorAction.Exit) + if (disposed) + monitorState.NextAction = MonitorAction.Exit; + else if (monitorState.NextAction != MonitorAction.Exit) monitorState = await MonitorRestart(cancellationToken).ConfigureAwait(false); await chatTask.ConfigureAwait(false);