diff --git a/Sources/Fluid/Services/SimpleUpdater.swift b/Sources/Fluid/Services/SimpleUpdater.swift index bc49f8a9..74d01583 100644 --- a/Sources/Fluid/Services/SimpleUpdater.swift +++ b/Sources/Fluid/Services/SimpleUpdater.swift @@ -918,6 +918,13 @@ final class SimpleUpdater { DebugLogger.shared.info("SimpleUpdater: Successfully relaunched app, terminating old instance", source: "SimpleUpdater") // Give the new instance time to fully start before terminating DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { + // Arm the fallback watchdog BEFORE calling terminate, because terminate blocks. + // The AppDelegate cleanup can take up to 16 seconds (8s for Private AI + 8s for ASR). + // We wait 20 seconds on a background queue to ensure it only fires if truly hung. + DispatchQueue.global().asyncAfter(deadline: .now() + 20.0) { + exit(0) + } + NSApp.terminate(nil) } }