简洁写法

pull/542/head
YFdyh000 2020-03-15 07:47:34 +08:00
parent 88d1948b51
commit 0334d52cfb
2 changed files with 6 additions and 6 deletions

View File

@ -35,19 +35,19 @@ namespace v2rayN.Handler
if (actionType == "ping")
{
Task.Factory.StartNew(() => RunPing());
Task.Run(() => RunPing());
}
if (actionType == "tcping")
{
Task.Factory.StartNew(() => RunTcping());
Task.Run(() => RunTcping());
}
else if (actionType == "realping")
{
Task.Factory.StartNew(() => RunRealPing());
Task.Run(() => RunRealPing());
}
else if (actionType == "speedtest")
{
Task.Factory.StartNew(() => RunSpeedTest());
Task.Run(() => RunSpeedTest());
}
}
@ -119,7 +119,7 @@ namespace v2rayN.Handler
}
i++;
tasks[i] = Task.Factory.StartNew(() => {
tasks[i] = Task.Run(() => {
try
{
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);

View File

@ -67,7 +67,7 @@ namespace v2rayN.Handler
GrpcInit();
Task.Factory.StartNew(() => Run());
Task.Run(() => Run());
}
private void GrpcInit()