diff --git a/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift b/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift index 5f029fb1e..4950b7c9d 100644 --- a/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift +++ b/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift @@ -60,7 +60,9 @@ public extension DataService { try backgroundContext.save() } } catch { - backgroundContext.rollback() + backgroundContext.performAndWait { + backgroundContext.rollback() + } throw error } }