mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 12:13:26 +01:00
Fixes serverNotFound error when refreshing apps due to background fetch
Extends time limit for discovering servers back to 3 seconds, and now accounts for wired and local servers.
This commit is contained in:
@@ -105,12 +105,11 @@ class BackgroundRefreshAppsOperation: ResultOperation<[String: Result<InstalledA
|
|||||||
|
|
||||||
self.startListeningForRunningApps()
|
self.startListeningForRunningApps()
|
||||||
|
|
||||||
// Wait for three seconds to:
|
// Wait for 3 seconds (2 now, 1 later in FindServerOperation) to:
|
||||||
// a) give us time to discover AltServers
|
// a) give us time to discover AltServers
|
||||||
// b) give other processes a chance to respond to requestAppState notification
|
// b) give other processes a chance to respond to requestAppState notification
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
|
||||||
self.managedObjectContext.perform {
|
self.managedObjectContext.perform {
|
||||||
guard !ServerManager.shared.discoveredServers.isEmpty else { return self.finish(.failure(ConnectionError.serverNotFound)) }
|
|
||||||
|
|
||||||
let filteredApps = self.installedApps.filter { !self.runningApplications.contains($0.bundleIdentifier) }
|
let filteredApps = self.installedApps.filter { !self.runningApplications.contains($0.bundleIdentifier) }
|
||||||
print("Filtered Apps to Refresh:", filteredApps.map { $0.bundleIdentifier })
|
print("Filtered Apps to Refresh:", filteredApps.map { $0.bundleIdentifier })
|
||||||
|
|||||||
Reference in New Issue
Block a user