Compare commits

...

2 commits

Author SHA1 Message Date
DHR60
fe14f0a94c Fix 2025-10-12 15:56:53 +08:00
DHR60
62ba0f4c23 Pref exception 2025-10-12 15:52:00 +08:00
2 changed files with 3 additions and 4 deletions

View file

@ -242,8 +242,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
} }
//Retest the failed part //Retest the failed part
var pageSizeNext = pageSize / 2; if (lstFailed.Count > 0)
if (lstFailed.Count > 0 && pageSizeNext > 0)
{ {
if (_lstExitLoop.Any(p => p == exitLoopKey) == false) if (_lstExitLoop.Any(p => p == exitLoopKey) == false)
{ {
@ -253,7 +252,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
await UpdateFunc("", string.Format(ResUI.SpeedtestingTestFailedPart, lstFailed.Count)); await UpdateFunc("", string.Format(ResUI.SpeedtestingTestFailedPart, lstFailed.Count));
await RunUdpTestBatchAsync(lstFailed, exitLoopKey, pageSizeNext); await RunUdpTestAsync(lstFailed, exitLoopKey);
} }
} }

View file

@ -94,7 +94,7 @@ public abstract class UdpService
} }
catch catch
{ {
if (attempt == 1) if (attempt == 1 && roundTripTime == TimeSpan.MaxValue)
{ {
throw; throw;
} }