TUNController: check Interop Init() return value.

when false, throws MessageException
This commit is contained in:
ChsBuffer
2021-05-04 00:24:09 +08:00
parent b1f89c177d
commit 00268d67fa

View File

@@ -89,7 +89,8 @@ namespace Netch.Controllers
#endregion
Global.Logger.Debug("tun2socks init");
Init();
if (!Init())
throw new MessageException("tun2socks start failed, reboot your system and start again.");
_tunAdapter = new TunAdapter();
switch (mode.Type)