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:
parent
791b18c376
commit
6f73a5571b
1 changed files with 5 additions and 9 deletions
|
@ -226,15 +226,11 @@ impl StreamLoaderController {
|
|||
.expect(DOWNLOAD_STATUS_POISON_MSG);
|
||||
let download_timeout = AudioFetchParams::get().download_timeout;
|
||||
|
||||
loop {
|
||||
if range.length
|
||||
<= download_status
|
||||
.downloaded
|
||||
.contained_length_from_value(range.start)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
while range.length
|
||||
> download_status
|
||||
.downloaded
|
||||
.contained_length_from_value(range.start)
|
||||
{
|
||||
let (new_download_status, wait_result) = shared
|
||||
.cond
|
||||
.wait_timeout(download_status, download_timeout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue