Import remote profiles serially (#674)
Follow the same approach as #636, because if no profiles are formerly installed the first import will trigger a VPN permission alert. Weird things may happen in that case if profiles are imported in parallel.
This commit is contained in:
parent
bf4ec4982a
commit
372e30cf68
|
@ -260,8 +260,9 @@ private extension ProfileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// pull remote updates into local profiles (best-effort)
|
// pull remote updates into local profiles (best-effort)
|
||||||
for remoteProfile in allRemoteProfiles.values {
|
let profilesToImport = allRemoteProfiles.values
|
||||||
Task.detached { [weak self] in
|
Task.detached { [weak self] in
|
||||||
|
for remoteProfile in profilesToImport {
|
||||||
do {
|
do {
|
||||||
pp_log(.app, .notice, "Import remote profile \(remoteProfile.id)...")
|
pp_log(.app, .notice, "Import remote profile \(remoteProfile.id)...")
|
||||||
try await self?.save(remoteProfile)
|
try await self?.save(remoteProfile)
|
||||||
|
|
Loading…
Reference in New Issue