Use an interruptible sleep to allow our threads to exit sooner

This commit is contained in:
Cameron Gutman
2019-04-06 15:26:59 -07:00
parent 9220fcb8e8
commit d6971983aa
5 changed files with 20 additions and 7 deletions

View File

@@ -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);
}
}
}