From 8206d1d5e4c46ebc957032dc1f50eb0e905d1ef1 Mon Sep 17 00:00:00 2001 From: NimBold Date: Sat, 27 Jun 2026 18:41:07 +0330 Subject: [PATCH] fix: ensure aria2c daemon terminates when app closes - Pass '--stop-with-process' to the aria2c command using the app's Process ID. - Prevents aria2c from becoming an orphaned process and continuing downloads invisibly in the background after the app is forcefully closed or terminated. --- src-tauri/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index e72576a..26cde00 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -4561,7 +4561,8 @@ pub fn run() { .arg("--console-log-level=warn") .arg("--download-result=hide") .arg("--max-concurrent-downloads=9999") - .arg("--check-certificate=true"); + .arg("--check-certificate=true") + .arg(format!("--stop-with-process={}", std::process::id())); if let Some(limit) = normalize_speed_limit_for_aria2(&global_speed_limit) { cmd.arg(format!("--max-overall-download-limit={}", limit));