:art:安装Tap driver时留出一点时间 防止找不到适配器ID

This commit is contained in:
Amazing_DM
2020-03-30 16:00:27 +08:00
parent ff0fe2ab9f
commit f05ae498c6

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Threading;
using System.Windows.Forms;
namespace Netch.Utils
@@ -169,6 +170,8 @@ namespace Netch.Utils
installProcess.Start();
installProcess.WaitForExit();
installProcess.Close();
//给点时间不然立马安装完毕就查找适配器可能会导致找不到适配器ID
Thread.Sleep(1000);
Global.TUNTAP.ComponentID = TUNTAP.GetComponentID();
}