mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 14:37:44 +01:00
Merge pull request #275 from Cyberboss/Cyberboss-patch-1
Removes old process priority compiler shennanigans
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user