File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Leanplum-SDK/Classes/Internal Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1192,11 +1192,13 @@ + (void)pause
11921192
11931193 // Block that finish task.
11941194 void (^finishTaskHandler)(void ) = ^(){
1195- // Make sure all database operations are done before ending the background task.
1196- [[LPOperationQueue serialQueue ] waitUntilAllOperationsAreFinished ];
1195+ dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
1196+ // Make sure all database operations are done before ending the background task.
1197+ [[LPOperationQueue serialQueue ] waitUntilAllOperationsAreFinished ];
11971198
1198- [application endBackgroundTask: backgroundTask];
1199- backgroundTask = UIBackgroundTaskInvalid;
1199+ [application endBackgroundTask: backgroundTask];
1200+ backgroundTask = UIBackgroundTaskInvalid;
1201+ });
12001202 };
12011203
12021204 // Start background task to make sure it runs when the app is in background.
You can’t perform that action at this time.
0 commit comments