mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 12:32:10 +00:00
When testing, start the core and then delay 1s before starting the test
https://github.com/2dust/v2rayN/issues/7391
This commit is contained in:
parent
9ddf0b42e7
commit
06500e0218
2 changed files with 8 additions and 6 deletions
|
@ -196,6 +196,7 @@ public class SpeedtestService
|
|||
{
|
||||
return false;
|
||||
}
|
||||
await Task.Delay(1000);
|
||||
|
||||
var downloadHandle = new DownloadService();
|
||||
|
||||
|
@ -255,9 +256,13 @@ public class SpeedtestService
|
|||
try
|
||||
{
|
||||
pid = await CoreHandler.Instance.LoadCoreConfigSpeedtest(it);
|
||||
if (pid > 0)
|
||||
if (pid < 0)
|
||||
{
|
||||
await Task.Delay(500);
|
||||
UpdateFunc(it.IndexId, "", ResUI.FailedToRunCore);
|
||||
}
|
||||
else
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
var delay = await DoRealPing(downloadHandle, it);
|
||||
if (blSpeedTest)
|
||||
{
|
||||
|
@ -271,10 +276,6 @@ public class SpeedtestService
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateFunc(it.IndexId, "", ResUI.FailedToRunCore);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -552,6 +552,7 @@ public class MainWindowViewModel : MyReactiveObject
|
|||
{
|
||||
await LoadCore();
|
||||
await SysProxyHandler.UpdateSysProxy(_config, false);
|
||||
await Task.Delay(1000);
|
||||
});
|
||||
Locator.Current.GetService<StatusBarViewModel>()?.TestServerAvailability();
|
||||
|
||||
|
|
Loading…
Reference in a new issue