From 981748b1f1d5e5b9dc08fb719bc9bc74f555ecb6 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Wed, 18 Oct 2017 10:05:39 -0400 Subject: [PATCH] Fixes crashes not being written to the resource diagnostics file --- TGServerService/DreamDaemon.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/TGServerService/DreamDaemon.cs b/TGServerService/DreamDaemon.cs index d7d5226721..ff6fac5c66 100644 --- a/TGServerService/DreamDaemon.cs +++ b/TGServerService/DreamDaemon.cs @@ -286,7 +286,8 @@ namespace TGServerService pcpu.Dispose(); } - bool BadStart; + WriteCurrentDDLog("Crash detected!"); + lock (watchdogLock) { currentStatus = TGDreamDaemonStatus.HardRebooting; @@ -295,7 +296,7 @@ namespace TGServerService if (AwaitingShutdown == ShutdownRequestPhase.Pinged) return; - BadStart = (DateTime.Now - starttime).TotalSeconds < DDBadStartTime; + var BadStart = (DateTime.Now - starttime).TotalSeconds < DDBadStartTime; if (BadStart) { ++retries; @@ -311,8 +312,6 @@ namespace TGServerService TGServerService.WriteWarning(msg, TGServerService.EventID.DDWatchdogRebootingServer); } } - if (BadStart) - WriteCurrentDDLog("Crash detected!"); var res = StartImpl(true); if (res != null)