fix: close post-release lifecycle state gaps

This commit is contained in:
NimBold
2026-07-15 10:13:53 +03:30
parent 9224117d77
commit 82f2914077
4 changed files with 139 additions and 4 deletions
+6
View File
@@ -3515,6 +3515,12 @@ async fn pause_download(
state.queue_manager.next_aria2_control_epoch(&id).await;
state.queue_manager.cancel_aria2_retries(&id).await;
if retrying && matches!(terminal, "error" | "removed") {
// The terminal GID was forgotten above, so this
// lifecycle can no longer be resumed in place. Release
// backend ownership as well; otherwise a paused row
// keeps a dead registration until another command happens
// to repair it.
state.queue_manager.release_registered_id(&id).await;
use tauri::Emitter;
let _ = app_handle.emit(
"download-state",