Fix a retain cycle in the SecureBackupController remoteBackupStateTask

Try to prevent closure crashes we've been seeing in sentry
This commit is contained in:
Stefan Ceriu
2026-02-06 13:10:59 +02:00
committed by Stefan Ceriu
parent 6da00fba54
commit 74f5ab18e9

View File

@@ -189,7 +189,9 @@ class SecureBackupController: SecureBackupControllerProtocol {
// MARK: - Private
private func updateBackupStateFromRemote(retry: Bool = true) {
remoteBackupStateTask = Task {
remoteBackupStateTask = Task { [weak self] in
guard let self else { return }
do {
MXLog.info("Checking if backup exists on the server")
let backupExists = try await self.encryption.backupExistsOnServer()