fix : await 버그 픽스
This commit is contained in:
@@ -72,6 +72,15 @@ public class EchoDummyClientService
|
||||
|
||||
private async Task SendLoopAsync(CancellationToken ct)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Task.Delay(500, ct);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int tick = 0;
|
||||
|
||||
while (!ct.IsCancellationRequested)
|
||||
@@ -140,6 +149,7 @@ public class EchoDummyClientService
|
||||
totalAvgRtt += c.AvgRttMs;
|
||||
rttClientCount++;
|
||||
}
|
||||
|
||||
if (c.peer != null)
|
||||
{
|
||||
connected++;
|
||||
|
||||
@@ -9,7 +9,7 @@ class EcoClientTester
|
||||
public static readonly string CONNECTION_KEY = "test";
|
||||
public static readonly int CLIENT_COUNT = 100;
|
||||
|
||||
private async void StartEchoDummyTest()
|
||||
private async Task StartEchoDummyTest()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -44,7 +44,7 @@ class EcoClientTester
|
||||
}
|
||||
}
|
||||
|
||||
private async void StartDummyTest()
|
||||
private async Task StartDummyTest()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -105,12 +105,12 @@ class EcoClientTester
|
||||
if (choice == 1)
|
||||
{
|
||||
// 에코 서버 실행
|
||||
tester.StartEchoDummyTest();
|
||||
await tester.StartEchoDummyTest();
|
||||
}
|
||||
else if (choice == 2)
|
||||
{
|
||||
// 더미 클라 실행
|
||||
tester.StartDummyTest();
|
||||
await tester.StartDummyTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user