From 7211aae1e2a4c2c617ab4ccd852deecf1f6b2014 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 20 Dec 2020 15:38:37 -0500 Subject: [PATCH] Fix 500 with graceful restart of offline watchdog --- src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs b/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs index 1c97a4a071..0170f9003e 100644 --- a/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs +++ b/src/Tgstation.Server.Host/Controllers/DreamDaemonController.cs @@ -283,7 +283,7 @@ namespace Tgstation.Server.Host.Controllers // run this second because current may be modified by it await watchdog.ChangeSettings(current, cancellationToken).ConfigureAwait(false); - if (!oldSoftRestart && model.SoftRestart == true) + if (!oldSoftRestart && model.SoftRestart == true && watchdog.Status == WatchdogStatus.Online) await watchdog.Restart(true, cancellationToken).ConfigureAwait(false); else if (!oldSoftShutdown && model.SoftShutdown == true) await watchdog.Terminate(true, cancellationToken).ConfigureAwait(false);