diff --git a/StikJIT/StikJITApp.swift b/StikJIT/StikJITApp.swift index 20a7bcc..dcc208b 100644 --- a/StikJIT/StikJITApp.swift +++ b/StikJIT/StikJITApp.swift @@ -812,9 +812,12 @@ func startHeartbeatInBackground(requireVPNConnection: Bool? = nil, showErrorUI: print("Heartbeat started successfully") pubHeartBeat = true - if FileManager.default.fileExists(atPath: URL.documentsDirectory.appendingPathComponent("DDI/Image.dmg.trustcache").path) { - -// MountingProgress.shared.pubMount() + DispatchQueue.main.async { + let trustcachePath = URL.documentsDirectory.appendingPathComponent("DDI/Image.dmg.trustcache").path + guard FileManager.default.fileExists(atPath: trustcachePath), + !MountingProgress.shared.coolisMounted, + MountingProgress.shared.mountingThread == nil else { return } + MountingProgress.shared.pubMount() } } catch { let err2 = error as NSError diff --git a/StikJIT/Views/HomeView.swift b/StikJIT/Views/HomeView.swift index ec339e7..812c346 100644 --- a/StikJIT/Views/HomeView.swift +++ b/StikJIT/Views/HomeView.swift @@ -214,7 +214,7 @@ struct HomeView: View { refreshBackground() checkPairingFileExists() heartbeatOK = pubHeartBeat - if !mounting.coolisMounted { + if mounting.mountingThread == nil && !mounting.coolisMounted { MountingProgress.shared.checkforMounted() } }