diff --git a/SignalServiceKit/src/Util/OWSBackgroundTask.m b/SignalServiceKit/src/Util/OWSBackgroundTask.m index d1829d88a..d45255e94 100644 --- a/SignalServiceKit/src/Util/OWSBackgroundTask.m +++ b/SignalServiceKit/src/Util/OWSBackgroundTask.m @@ -261,7 +261,7 @@ typedef NSNumber *OWSTaskId; // to ensure that. We thereby ensure that we don't end the background task // until all of the completion blocks have completed. DispatchSyncMainThreadSafe(^{ - for (BackgroundTaskExpirationBlock expirationBlock in expirationMap) { + for (BackgroundTaskExpirationBlock expirationBlock in expirationMap.allValues) { expirationBlock(); } if (backgroundTaskId != UIBackgroundTaskInvalid) {