尝试修复退出错误

修复停止时进程堵塞
This commit is contained in:
ChsBuffer
2020-07-25 04:02:01 +08:00
parent 6174e78696
commit bbf9c5ed7c
11 changed files with 160 additions and 151 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Text;
@@ -67,10 +68,14 @@ namespace Netch.Controllers
Instance.Kill();
Instance.WaitForExit();
}
catch (Exception e)
catch (Win32Exception e)
{
Logging.Error($"停止 {MainFile} 错误:\n" + e);
}
catch
{
// ignored
}
}