mirror of
https://github.com/2dust/v2rayN.git
synced 2025-12-10 05:19:42 +05:00
Fix
This commit is contained in:
@@ -337,6 +337,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
|||||||
{
|
{
|
||||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
|
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
|
||||||
await clientSocket.ConnectAsync(endPoint, cts.Token).ConfigureAwait(false);
|
await clientSocket.ConnectAsync(endPoint, cts.Token).ConfigureAwait(false);
|
||||||
|
responseTime = (int)timer.ElapsedMilliseconds;
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
@@ -344,7 +345,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
|||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
responseTime = (int)timer.Elapsed.TotalMilliseconds;
|
|
||||||
}
|
}
|
||||||
return responseTime;
|
return responseTime;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user