diff --git a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs
index b1f3496329..5e79d35cff 100644
--- a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs
+++ b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs
@@ -1,4 +1,5 @@
-using System.ComponentModel.DataAnnotations;
+using System;
+using System.ComponentModel.DataAnnotations;
namespace Tgstation.Server.Api.Models.Internal
{
@@ -36,5 +37,17 @@ namespace Tgstation.Server.Api.Models.Internal
///
[Required]
public uint? StartupTimeout { get; set; }
+
+ ///
+ /// Check if we match a given set of
+ ///
+ /// The to compare against
+ /// if they match, otherwise
+ public bool Match(DreamDaemonLaunchParameters otherParameters) =>
+ AllowWebClient == otherParameters.AllowWebClient
+ && SecurityLevel == otherParameters.SecurityLevel
+ && PrimaryPort == otherParameters.PrimaryPort
+ && SecondaryPort == otherParameters.SecondaryPort
+ && StartupTimeout == otherParameters.StartupTimeout;
}
}
\ No newline at end of file
diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs
index 412612e49c..6bee502b02 100644
--- a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs
+++ b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs
@@ -617,6 +617,8 @@ namespace Tgstation.Server.Host.Components.Watchdog
{
using (await SemaphoreSlimContext.Lock(semaphore, cancellationToken).ConfigureAwait(false))
{
+ if (launchParameters.Match(ActiveLaunchParameters))
+ return;
ActiveLaunchParameters = launchParameters;
if (Running)
//queue an update
@@ -780,6 +782,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
///
public async Task Restart(bool graceful, CancellationToken cancellationToken)
{
+ logger.LogTrace("Begin Restart. Graceful: {0}", graceful);
using (await SemaphoreSlimContext.Lock(semaphore, cancellationToken).ConfigureAwait(false))
{
if (!graceful || !Running)