diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs b/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs index 1186753..821eb3e 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs +++ b/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs @@ -219,7 +219,7 @@ namespace net.nutcore.aliddns textBox_log.AppendText(System.DateTime.Now.ToString() + " " + "请检查配置文件查询网址设置!" + "\r\n"); return "0.0.0.0"; } - return "0.0.0.0"; + //return "0.0.0.0"; } catch (Exception error) { diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs b/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs index b8891af..cd89611 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs +++ b/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs @@ -210,12 +210,13 @@ namespace net.nutcore.aliddns try { - Thread thread = new Thread(() => + Task task = Task.Factory.StartNew(() => { var proc = Process.Start(exec); proc.WaitForExit(); proc.Dispose(); }); + task.Start(); } catch (Exception ex) { @@ -225,17 +226,26 @@ namespace net.nutcore.aliddns public void Stop() { - Thread thread = new Thread(() => + try { - Process[] pList = Process.GetProcessesByName("Ngrok"); - foreach (Process p in pList) + Task task = Task.Factory.StartNew(() => { - Console.WriteLine($"Kill: {p.Id}"); - p.Kill(); - p.WaitForExit(); - p.Dispose(); - } - }); + Process[] pList = Process.GetProcessesByName("Ngrok"); + foreach (Process p in pList) + { + Console.WriteLine($"Kill: {p.Id}"); + p.Kill(); + p.WaitForExit(); + p.Dispose(); + } + }); + task.Start(); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + } } } diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt b/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt index 8293705..b2ee3b6 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt +++ b/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt @@ -1,3 +1,6 @@ +v3.8.6.0 +1޸Ĵ룬.netܰ汾4.5͵4.0WinXPϵͳУWinXPϵͳ֧.net 4.0 + v3.8.5.0 1޸ʵʱ档2ӶIPַԶѯзֵʱֹͣ3򻯴롣