mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-27 19:17:13 +00:00
fix: treat paused as stopped state in wait_for_aria2_stopped
This commit is contained in:
@@ -3055,7 +3055,7 @@ async fn force_remove_aria2_gid(port: u16, secret: &str, gid: &str) -> Result<()
|
|||||||
async fn wait_for_aria2_stopped(port: u16, secret: &str, gid: &str) -> Result<(), String> {
|
async fn wait_for_aria2_stopped(port: u16, secret: &str, gid: &str) -> Result<(), String> {
|
||||||
for _ in 0..30 {
|
for _ in 0..30 {
|
||||||
match aria2_download_status(port, secret, gid).await {
|
match aria2_download_status(port, secret, gid).await {
|
||||||
Ok(status) if matches!(status.as_str(), "complete" | "error" | "removed") => {
|
Ok(status) if matches!(status.as_str(), "paused" | "complete" | "error" | "removed") => {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
Ok(_) => {}
|
Ok(_) => {}
|
||||||
|
|||||||
Reference in New Issue
Block a user