From d6e1cd02341ed05793cf81e57163080765b30b16 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 24 Oct 2017 16:52:29 -0400 Subject: [PATCH] Removes old process priority compiler shennanigans --- TGServerService/ServerInstance/Compiler.cs | 36 ++++++---------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/TGServerService/ServerInstance/Compiler.cs b/TGServerService/ServerInstance/Compiler.cs index ff5e781a4f..6ed2f315e8 100644 --- a/TGServerService/ServerInstance/Compiler.cs +++ b/TGServerService/ServerInstance/Compiler.cs @@ -487,37 +487,21 @@ namespace TGServerService { lock (watchdogLock) { + //gotta go fast + var online = currentStatus == DreamDaemonStatus.Online; + if (online) + Proc.Suspend(); try { - //gotta go fast - var online = currentStatus == DreamDaemonStatus.Online; - if (online) - Proc.Suspend(); - try - { - if (Directory.Exists(GameDirLive)) - //these two lines should be atomic but this is the best we can do - Directory.Delete(GameDirLive); - CreateSymlink(GameDirLive, resurrectee); - } - finally - { - if (online && !Proc.HasExited) - Proc.Resume(); - } + if (Directory.Exists(GameDirLive)) + //these two lines should be atomic but this is the best we can do + Directory.Delete(GameDirLive); + CreateSymlink(GameDirLive, resurrectee); } finally { - if (currentStatus == DreamDaemonStatus.Online) - { - try - { - Proc.PriorityClass = ProcessPriorityClass.Normal; - } - catch { } - Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal; - Thread.CurrentThread.Priority = ThreadPriority.Normal; - } + if (online && !Proc.HasExited) + Proc.Resume(); } } var staged = DaemonStatus() != DreamDaemonStatus.Offline;