Skip to content

Commit

Permalink
Update RNFBMessaging+AppDelegate.m
Browse files Browse the repository at this point in the history
  • Loading branch information
Beat-YT authored Nov 22, 2024
1 parent c603816 commit d49fbe0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ - (void)application:(UIApplication *)application
// If app is in background state, register background task to guarantee async queues aren't
// frozen.
sharedInstance.backgroundTaskId = [application beginBackgroundTaskWithExpirationHandler:^{
if (backgroundTaskId != UIBackgroundTaskInvalid) {
[application endBackgroundTask:backgroundTaskId];
backgroundTaskId = UIBackgroundTaskInvalid;
if (sharedInstance.backgroundTaskId != UIBackgroundTaskInvalid) {
[application endBackgroundTask:sharedInstance.backgroundTaskId];
sharedInstance.backgroundTaskId = UIBackgroundTaskInvalid;
}
}];

Expand Down Expand Up @@ -246,4 +246,4 @@ - (void)application:(UIApplication *)application
}
}

@end
@end

0 comments on commit d49fbe0

Please sign in to comment.