Skip to content

Commit 386209b

Browse files
committed
Fix
1 parent 830dc89 commit 386209b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

v2rayN/ServiceLib/Services/SpeedtestService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,14 @@ private async Task<int> GetTcpingTime(string url, int port)
337337
{
338338
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
339339
await clientSocket.ConnectAsync(endPoint, cts.Token).ConfigureAwait(false);
340+
responseTime = (int)timer.ElapsedMilliseconds;
340341
}
341342
catch (OperationCanceledException)
342343
{
343344
}
344345
finally
345346
{
346347
timer.Stop();
347-
responseTime = (int)timer.Elapsed.TotalMilliseconds;
348348
}
349349
return responseTime;
350350
}

0 commit comments

Comments
 (0)