Wait until buffer is empty when downloading

This commit is contained in:
ByteDream 2022-12-04 18:54:19 +01:00
parent 342cf23ae0
commit faadd89fff

View file

@ -169,7 +169,7 @@ pub async fn download_segments(
data_pos += 1;
}
if *count.lock().unwrap() >= total_segments {
if *count.lock().unwrap() >= total_segments && buf.is_empty() {
break;
}
}