From 0ffe1bc6049abec7b2909aad62e49b66017be6e8 Mon Sep 17 00:00:00 2001 From: Tom Hollis <57675191+tomrhollis@users.noreply.github.com> Date: Wed, 14 Oct 2020 13:20:43 -0600 Subject: [PATCH 1/2] stop watchdog seeing stopbeforebackup as crash --- src/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Program.cs b/src/Program.cs index b12ead1..9e833f8 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -579,7 +579,9 @@ public void InvokeBackup(string worldPath, string tempWorldPath) { if (!_backupManager.Processing) { + if (RunConfig.Backups.StopBeforeBackup) _bdsWatchdog.Disable(); _backupManager.CreateWorldBackup(worldPath, tempWorldPath, false, true); + if (RunConfig.Backups.StopBeforeBackup) _bdsWatchdog.Enable(); } else { @@ -591,7 +593,9 @@ public void InvokeRender(string worldPath, string tempWorldPath) { if (!_backupManager.Processing && !_renderManager.Processing) { + if (RunConfig.Backups.StopBeforeBackup) _bdsWatchdog.Disable(); _backupManager.CreateWorldBackup(worldPath, tempWorldPath, false, false); + if (RunConfig.Backups.StopBeforeBackup) _bdsWatchdog.Enable(); _renderManager.Start(tempWorldPath); } else From dd7461339edb2aaaf5a107954b2d555fd3c97678 Mon Sep 17 00:00:00 2001 From: Tom Hollis <57675191+tomrhollis@users.noreply.github.com> Date: Sat, 17 Oct 2020 15:15:34 -0600 Subject: [PATCH 2/2] also disable on vellum exception --- src/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Program.cs b/src/Program.cs index 9e833f8..223cc68 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -186,6 +186,7 @@ public VellumHost(string[] args) if (bds.IsRunning) { + _bdsWatchdog.Disable(); bds.SendInput("stop"); bds.Process.WaitForExit(); bds.Close();