Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
netbe committed Nov 29, 2024
1 parent 6440964 commit db256ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ extension SessionManager: VoIPPushManagerDelegate {
WireLogger.calling.info("process pending call events preemptively")

guard
let account = accountManager.account(with: accountID),
let account = accountManager.account(with: accountID)
else {
WireLogger.calling.error("failed to process pending call events preemptively: account not found for \(accountID))")
return
}

Check failure on line 72 in wire-ios-sync-engine/Source/SessionManager/SessionManager+VoIPPushManagerDelegate.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Lines should not have trailing whitespace (trailing_whitespace)
guard
let activity = BackgroundActivityFactory.shared.startBackgroundActivity(name: "processPendingCallEvents")
else {
WireLogger.calling.error("failed to process pending call events preemptively")
WireLogger.calling.error("failed to process pending call events preemptively: activity not started")
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1037,12 +1037,13 @@ extension ZMUserSession: ZMSyncStateDelegate {
WireLogger.updateEvent.info("process pending call events")
Task {
do {
// why not processing only the call events (should be stored here?)
try await updateEventProcessor!.processBufferedEvents()
await managedObjectContext.perform {
completionHandler()
}
} catch {
WireLogger.mls.error("Failed to process pending call events: \(String(reflecting: error))")
WireLogger.updateEvent.error("Failed to process pending call events: \(String(reflecting: error))")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public final class BackgroundActivityFactory: NSObject {

/// Called on main queue when the background timer is about to expire.
private func handleExpiration() {
guard let activityManager else {
guard activityManager != nil else {
WireLogger.backgroundActivity.warn(
"Handle expiration: failed, activityManager is nil",
attributes: .safePublic
Expand Down

0 comments on commit db256ac

Please sign in to comment.