fix: wayfern initial connection on macos doesn't timeout

This commit is contained in:
zhom
2026-03-29 13:03:17 +04:00
parent a3514df0d4
commit 1099459dbb
+4 -2
View File
@@ -136,8 +136,10 @@ impl WayfernManager {
port: u16,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
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 {