fix : await 버그 픽스

This commit is contained in:
qornwh1
2026-03-04 09:11:04 +09:00
parent 9930348d5e
commit d16e4a05e5
2 changed files with 14 additions and 4 deletions

View File

@@ -72,6 +72,15 @@ public class EchoDummyClientService
private async Task SendLoopAsync(CancellationToken ct) private async Task SendLoopAsync(CancellationToken ct)
{ {
try
{
await Task.Delay(500, ct);
}
catch (OperationCanceledException)
{
return;
}
int tick = 0; int tick = 0;
while (!ct.IsCancellationRequested) while (!ct.IsCancellationRequested)
@@ -140,6 +149,7 @@ public class EchoDummyClientService
totalAvgRtt += c.AvgRttMs; totalAvgRtt += c.AvgRttMs;
rttClientCount++; rttClientCount++;
} }
if (c.peer != null) if (c.peer != null)
{ {
connected++; connected++;

View File

@@ -9,7 +9,7 @@ class EcoClientTester
public static readonly string CONNECTION_KEY = "test"; public static readonly string CONNECTION_KEY = "test";
public static readonly int CLIENT_COUNT = 100; public static readonly int CLIENT_COUNT = 100;
private async void StartEchoDummyTest() private async Task StartEchoDummyTest()
{ {
try try
{ {
@@ -44,7 +44,7 @@ class EcoClientTester
} }
} }
private async void StartDummyTest() private async Task StartDummyTest()
{ {
try try
{ {
@@ -105,12 +105,12 @@ class EcoClientTester
if (choice == 1) if (choice == 1)
{ {
// 에코 서버 실행 // 에코 서버 실행
tester.StartEchoDummyTest(); await tester.StartEchoDummyTest();
} }
else if (choice == 2) else if (choice == 2)
{ {
// 더미 클라 실행 // 더미 클라 실행
tester.StartDummyTest(); await tester.StartDummyTest();
} }
} }
} }