mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Add various retries to the minimuxer calls
This commit is contained in:
@@ -204,17 +204,21 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
try install_ipa(installedApp.bundleIdentifier)
|
||||
installing = false
|
||||
} catch {
|
||||
installing = false
|
||||
return self.finish(.failure(error))
|
||||
var attempts = 10
|
||||
while (attempts != 0){
|
||||
print("Install ipa attempts left: \(attempts)")
|
||||
do {
|
||||
try install_ipa(installedApp.bundleIdentifier)
|
||||
installing = false
|
||||
installedApp.refreshedDate = Date()
|
||||
return self.finish(.success(installedApp))
|
||||
} catch {
|
||||
if (attempts == 0){
|
||||
installing = false
|
||||
return self.finish(.failure(error))
|
||||
} else { attempts -= 1 }
|
||||
}
|
||||
}
|
||||
|
||||
installedApp.refreshedDate = Date()
|
||||
self.finish(.success(installedApp))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user