mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
AI-optimized code
This commit is contained in:
parent
a0af4fb30c
commit
3869148fc8
1 changed files with 4 additions and 5 deletions
|
@ -37,7 +37,7 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
public void ClashProxiesDelayTest(bool blAll, List<ClashProxyModel> lstProxy, Action<ClashProxyModel?, string> updateFunc)
|
public void ClashProxiesDelayTest(bool blAll, List<ClashProxyModel> lstProxy, Action<ClashProxyModel?, string> updateFunc)
|
||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
if (blAll)
|
if (blAll)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@ namespace ServiceLib.Handler
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Task.Delay(5000).Wait();
|
await Task.Delay(5000);
|
||||||
}
|
}
|
||||||
if (_proxies == null)
|
if (_proxies == null)
|
||||||
{
|
{
|
||||||
|
@ -90,9 +90,8 @@ namespace ServiceLib.Handler
|
||||||
updateFunc?.Invoke(it, result);
|
updateFunc?.Invoke(it, result);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
Task.WaitAll(tasks.ToArray());
|
await Task.WhenAll(tasks);
|
||||||
|
await Task.Delay(1000);
|
||||||
Task.Delay(1000).Wait();
|
|
||||||
updateFunc?.Invoke(null, "");
|
updateFunc?.Invoke(null, "");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue