mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
Add wait for exit
This commit is contained in:
@@ -59,6 +59,7 @@ namespace Netch.Controllers
|
||||
if (Instance != null && !Instance.HasExited)
|
||||
{
|
||||
Instance.Kill();
|
||||
Instance.WaitForExit();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace Netch.Controllers
|
||||
if (Instance != null && !Instance.HasExited)
|
||||
{
|
||||
Instance.Kill();
|
||||
Instance.WaitForExit();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace Netch.Controllers
|
||||
if (Instance != null && !Instance.HasExited)
|
||||
{
|
||||
Instance.Kill();
|
||||
Instance.WaitForExit();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -117,12 +117,17 @@ namespace Netch.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Global.Settings.BootShadowsocksFromDLL)
|
||||
{
|
||||
NativeMethods.Shadowsocks.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Instance != null && !Instance.HasExited)
|
||||
{
|
||||
Instance.Kill();
|
||||
Instance.WaitForExit();
|
||||
}
|
||||
if (Global.Settings.BootShadowsocksFromDLL)
|
||||
NativeMethods.Shadowsocks.Stop();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -106,6 +106,7 @@ namespace Netch.Controllers
|
||||
if (Instance != null && !Instance.HasExited)
|
||||
{
|
||||
Instance.Kill();
|
||||
Instance.WaitForExit();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -216,6 +216,7 @@ namespace Netch.Controllers
|
||||
if (Instance != null && !Instance.HasExited)
|
||||
{
|
||||
Instance.Kill();
|
||||
Instance.WaitForExit();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user