diff --git a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs index 6ce7108c42..939661e74d 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/Watchdog.cs @@ -735,6 +735,13 @@ namespace Tgstation.Server.Host.Components.Watchdog } catch (Exception e) { + var originalChatTask = chatTask; + async Task ChainChatTaskWithErrorMessage() + { + await originalChatTask.ConfigureAwait(false); + await chat.SendWatchdogMessage("Startup failed!", cancellationToken).ConfigureAwait(false); + } + chatTask = ChainChatTaskWithErrorMessage(); logger.LogWarning("Failed to start watchdog: {0}", e.ToString()); throw; }