From 1099459dbb988c8822e95a82e5ed435e5445c72c Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:03:17 +0400 Subject: [PATCH] fix: wayfern initial connection on macos doesn't timeout --- src-tauri/src/wayfern_manager.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/wayfern_manager.rs b/src-tauri/src/wayfern_manager.rs index cb8184a..01b59a3 100644 --- a/src-tauri/src/wayfern_manager.rs +++ b/src-tauri/src/wayfern_manager.rs @@ -136,8 +136,10 @@ impl WayfernManager { port: u16, ) -> Result<(), Box> { let url = format!("http://127.0.0.1:{port}/json/version"); - let max_attempts = 50; - let delay = Duration::from_millis(100); + // On first launch, macOS Gatekeeper verifies the binary which can take 30+ seconds. + // Use a generous timeout (60s) to handle this. + let max_attempts = 120; + let delay = Duration::from_millis(500); for attempt in 0..max_attempts { match self.http_client.get(&url).send().await {