mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 14:06:41 +01:00
Merge pull request #110 from Cyberboss/KillFix
Fixes the gotcha with Process.Kill()
This commit is contained in:
@@ -415,7 +415,10 @@ namespace TGServerService
|
||||
catch
|
||||
{
|
||||
if (!DM.HasExited)
|
||||
{
|
||||
DM.Kill();
|
||||
DM.WaitForExit();
|
||||
}
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -266,7 +266,10 @@ namespace TGServerService
|
||||
try
|
||||
{
|
||||
if (!Properties.Settings.Default.ReattachToDD)
|
||||
{
|
||||
Proc.Kill();
|
||||
Proc.WaitForExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default.ReattachPID = Proc.Id;
|
||||
@@ -402,6 +405,7 @@ namespace TGServerService
|
||||
if (!Proc.WaitForInputIdle(DDHangStartTime * 1000))
|
||||
{
|
||||
Proc.Kill();
|
||||
Proc.WaitForExit();
|
||||
Proc.Close();
|
||||
ShutdownInterop();
|
||||
currentStatus = TGDreamDaemonStatus.Offline;
|
||||
|
||||
Reference in New Issue
Block a user