Skip to content

Commit 4b93e03

Browse files
committed
Adding Task.Delay(10); inside each while(true) loop so ButtPlugCLient has time to process the incomming message buffer (especially pings coming from the server)
1 parent f9ec675 commit 4b93e03

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ async Task ControlDevice() {
8282
{
8383
break;
8484
}
85+
await Task.Delay(10);
8586
}
8687

8788
var options = new List<uint>();
@@ -106,6 +107,7 @@ async Task ControlDevice() {
106107
Console.WriteLine($"Device {selectedDevice.Name} selected");
107108
break;
108109
}
110+
await Task.Delay(10);
109111
}
110112

111113

@@ -178,6 +180,7 @@ async Task ControlDevice() {
178180
Console.WriteLine($"Problem vibrating: {e}");
179181
}
180182
}
183+
await Task.Delay(10);
181184
}
182185

183186
}

0 commit comments

Comments
 (0)