mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
简洁写法
This commit is contained in:
parent
88d1948b51
commit
0334d52cfb
2 changed files with 6 additions and 6 deletions
|
@ -35,19 +35,19 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
if (actionType == "ping")
|
if (actionType == "ping")
|
||||||
{
|
{
|
||||||
Task.Factory.StartNew(() => RunPing());
|
Task.Run(() => RunPing());
|
||||||
}
|
}
|
||||||
if (actionType == "tcping")
|
if (actionType == "tcping")
|
||||||
{
|
{
|
||||||
Task.Factory.StartNew(() => RunTcping());
|
Task.Run(() => RunTcping());
|
||||||
}
|
}
|
||||||
else if (actionType == "realping")
|
else if (actionType == "realping")
|
||||||
{
|
{
|
||||||
Task.Factory.StartNew(() => RunRealPing());
|
Task.Run(() => RunRealPing());
|
||||||
}
|
}
|
||||||
else if (actionType == "speedtest")
|
else if (actionType == "speedtest")
|
||||||
{
|
{
|
||||||
Task.Factory.StartNew(() => RunSpeedTest());
|
Task.Run(() => RunSpeedTest());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
tasks[i] = Task.Factory.StartNew(() => {
|
tasks[i] = Task.Run(() => {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
|
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort + itemIndex);
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
GrpcInit();
|
GrpcInit();
|
||||||
|
|
||||||
Task.Factory.StartNew(() => Run());
|
Task.Run(() => Run());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GrpcInit()
|
private void GrpcInit()
|
||||||
|
|
Loading…
Reference in a new issue