Clear pendingPreKeyRotation when an error occurs

This commit is contained in:
Max Radermacher 2025-06-10 00:56:33 -05:00 committed by GitHub
parent 9ffa21e4c2
commit d2e09dcfd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -431,8 +431,11 @@ public class MessageSender {
// Only try to update the signed prekey; updating it is sufficient to
// re-enable message sending.
return Task {
defer {
// If this succeeds, or if we hit an error, allow another attempt.
self.pendingPreKeyRotation.set(nil)
}
try await self.preKeyManager.rotateSignedPreKeysIfNeeded().value
self.pendingPreKeyRotation.set(nil)
}
}
return nil