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.
This commit is contained in:
NimBold
2026-06-27 18:41:07 +03:30
parent b2b370161a
commit 8206d1d5e4
+2 -1
View File
@@ -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));