From 10362d786dbf5dda761271494ff77cf478da18c7 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 9 Jul 2020 12:40:26 -0400 Subject: [PATCH] Add a check to watchdog detach failure --- .../Components/Watchdog/WatchdogBase.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs index 2574ed55b8..0699f96772 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs @@ -923,7 +923,17 @@ namespace Tgstation.Server.Host.Components.Watchdog await TerminateNoLock(false, !releaseServers, cancellationToken).ConfigureAwait(false); if (releasedReattachInformation != null) { - await sessionPersistor.Save(releasedReattachInformation, cancellationToken).ConfigureAwait(false); + try + { + await sessionPersistor.Save(releasedReattachInformation, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.LogCritical( + "Failed to persist session reattach information! To repair this, DreamDaemon will need to be manully stopped and then relaunched with TGS. Exception: {0}", + ex); + } + releasedReattachInformation = null; releaseServers = false; }