mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-08 00:36:30 +00:00
Use an interruptible sleep to allow our threads to exit sooner
This commit is contained in:
@@ -60,10 +60,10 @@ static void UdpPingThreadProc(void* context) {
|
||||
|
||||
// Send less frequently if we've received data from our peer
|
||||
if (receivedDataFromPeer) {
|
||||
PltSleepMs(5000);
|
||||
PltSleepMsInterruptible(&udpPingThread, 5000);
|
||||
}
|
||||
else {
|
||||
PltSleepMs(500);
|
||||
PltSleepMsInterruptible(&udpPingThread, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user