Merge pull request #1174 from tgstation/Casual500 [TGSDeploy]

Fix 500 with graceful restart of offline watchdog
This commit is contained in:
Jordan Brown
2020-12-21 13:09:39 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<!-- Integration tests will ensure they match across the board -->
<Import Project="ControlPanelVersion.props" />
<PropertyGroup>
<TgsCoreVersion>4.6.2</TgsCoreVersion>
<TgsCoreVersion>4.6.3</TgsCoreVersion>
<TgsConfigVersion>2.1.1</TgsConfigVersion>
<TgsApiVersion>7.4.0</TgsApiVersion>
<TgsClientVersion>8.4.0</TgsClientVersion>
@@ -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);