Bug fix
This commit is contained in:
@@ -64,7 +64,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
var lstSelected = new List<ServerTestItem>();
|
||||
foreach (var it in selecteds)
|
||||
{
|
||||
if (it.ConfigType == EConfigType.Custom)
|
||||
if (it.ConfigType is EConfigType.Custom or EConfigType.PolicyGroup or EConfigType.ProxyChain)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -116,10 +116,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
List<Task> tasks = [];
|
||||
foreach (var it in selecteds)
|
||||
{
|
||||
if (it.ConfigType == EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tasks.Add(Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
@@ -199,10 +195,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (it.ConfigType == EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tasks.Add(Task.Run(async () =>
|
||||
{
|
||||
await DoRealPing(it);
|
||||
@@ -216,7 +208,10 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
}
|
||||
finally
|
||||
{
|
||||
await processService?.StopAsync();
|
||||
if (processService != null)
|
||||
{
|
||||
await processService?.StopAsync();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -233,10 +228,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
await UpdateFunc(it.IndexId, "", ResUI.SpeedtestingSkip);
|
||||
continue;
|
||||
}
|
||||
if (it.ConfigType == EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
await concurrencySemaphore.WaitAsync();
|
||||
|
||||
tasks.Add(Task.Run(async () =>
|
||||
@@ -272,7 +263,10 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
}
|
||||
finally
|
||||
{
|
||||
await processService?.StopAsync();
|
||||
if (processService != null)
|
||||
{
|
||||
await processService?.StopAsync();
|
||||
}
|
||||
concurrencySemaphore.Release();
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -28,7 +28,7 @@ public partial class RoutingRuleDetailsWindow : WindowBase<RoutingRuleDetailsVie
|
||||
clbProtocol.ItemsSource = Global.RuleProtocols;
|
||||
clbInboundTag.ItemsSource = Global.InboundTags;
|
||||
cmbNetwork.ItemsSource = Global.RuleNetworks;
|
||||
cmbRuleType.ItemsSource = Utils.GetEnumNames<ERuleType>();
|
||||
cmbRuleType.ItemsSource = Utils.GetEnumNames<ERuleType>().AppendEmpty();
|
||||
|
||||
if (!rulesItem.Id.IsNullOrEmpty())
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ public partial class RoutingRuleDetailsWindow
|
||||
clbProtocol.ItemsSource = Global.RuleProtocols;
|
||||
clbInboundTag.ItemsSource = Global.InboundTags;
|
||||
cmbNetwork.ItemsSource = Global.RuleNetworks;
|
||||
cmbRuleType.ItemsSource = Utils.GetEnumNames<ERuleType>();
|
||||
cmbRuleType.ItemsSource = Utils.GetEnumNames<ERuleType>().AppendEmpty();
|
||||
|
||||
if (!rulesItem.Id.IsNullOrEmpty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user