From 2335a329f4f4e14433c739b170c3555de43b06e3 Mon Sep 17 00:00:00 2001 From: ltf Date: Sat, 7 Nov 2026 05:00:19 +0800 Subject: [PATCH] fix(remote): keep the Remote service running after a device is paired Creating a device pairing now enables web_service.auto_start. Without it the service stopped with the desktop app, so a paired phone had to be paired again after every desktop restart even though its credential was still valid. --- src-tauri/src/commands/web_service.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src-tauri/src/commands/web_service.rs b/src-tauri/src/commands/web_service.rs index 775e15569..ec00487fe 100644 --- a/src-tauri/src/commands/web_service.rs +++ b/src-tauri/src/commands/web_service.rs @@ -594,6 +594,13 @@ pub async fn create_host_device_pairing( ) .await .map_err(|error| AppError::Internal(error.to_string()))?; + // A device that pairs expects to find this Host again after a restart. + if let Ok(mut config) = load_config().await + && !config.auto_start + { + config.auto_start = true; + save_config(&config).await?; + } let host_id = load_or_create_host_id().await?; let addresses = { let runtime = WEB_SERVICE_RUNTIME.lock().await;