diff --git a/scripts/smoke-packaged-app.js b/scripts/smoke-packaged-app.js index 3d48b3f..13f0180 100755 --- a/scripts/smoke-packaged-app.js +++ b/scripts/smoke-packaged-app.js @@ -30,6 +30,7 @@ const child = spawn(executable, [], { env: { ...process.env, FIRELINK_SMOKE_TEST: '1', + FIRELINK_DISABLE_ARIA2_STARTUP: '1', WEBKIT_DISABLE_COMPOSITING_MODE: '1', GDK_BACKEND: 'x11', }, diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 9edbd8f..6ae8ed3 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -18628,6 +18628,9 @@ pub fn run() { let aria2_secret_clone = aria2_secret.clone(); let app_handle_bg = app.handle().clone(); tauri::async_runtime::spawn(async move { + if std::env::var_os("FIRELINK_DISABLE_ARIA2_STARTUP").is_some() { + return; + } let mut ws_port = 6800; match resolve_bundled_binary_path(&app_handle_bg, "aria2c") { @@ -19007,6 +19010,9 @@ pub fn run() { let poll_secret = aria2_secret.clone(); let poll_mgr = Arc::clone(&queue_manager_poll); tauri::async_runtime::spawn(async move { + if std::env::var_os("FIRELINK_DISABLE_ARIA2_STARTUP").is_some() { + return; + } let mut interval = tokio::time::interval(std::time::Duration::from_millis(1000)); let mut observations: HashMap = HashMap::new(); let mut missing_gid_recovery_at: HashMap = HashMap::new();