1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 09:49:31 +02:00

refactor: revert to while condition in download loop

This commit is contained in:
Roderick van Domburg 2025-08-20 13:02:36 +02:00
parent 791b18c376
commit 6f73a5571b
No known key found for this signature in database
GPG key ID: 607FA06CB5236AE0

View file

@ -226,15 +226,11 @@ impl StreamLoaderController {
.expect(DOWNLOAD_STATUS_POISON_MSG); .expect(DOWNLOAD_STATUS_POISON_MSG);
let download_timeout = AudioFetchParams::get().download_timeout; let download_timeout = AudioFetchParams::get().download_timeout;
loop { while range.length
if range.length > download_status
<= download_status
.downloaded .downloaded
.contained_length_from_value(range.start) .contained_length_from_value(range.start)
{ {
break;
}
let (new_download_status, wait_result) = shared let (new_download_status, wait_result) = shared
.cond .cond
.wait_timeout(download_status, download_timeout) .wait_timeout(download_status, download_timeout)