Skip to content

Commit d49fbe0

Browse files
authored
Update RNFBMessaging+AppDelegate.m
1 parent c603816 commit d49fbe0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/messaging/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ - (void)application:(UIApplication *)application
163163
// If app is in background state, register background task to guarantee async queues aren't
164164
// frozen.
165165
sharedInstance.backgroundTaskId = [application beginBackgroundTaskWithExpirationHandler:^{
166-
if (backgroundTaskId != UIBackgroundTaskInvalid) {
167-
[application endBackgroundTask:backgroundTaskId];
168-
backgroundTaskId = UIBackgroundTaskInvalid;
166+
if (sharedInstance.backgroundTaskId != UIBackgroundTaskInvalid) {
167+
[application endBackgroundTask:sharedInstance.backgroundTaskId];
168+
sharedInstance.backgroundTaskId = UIBackgroundTaskInvalid;
169169
}
170170
}];
171171

@@ -246,4 +246,4 @@ - (void)application:(UIApplication *)application
246246
}
247247
}
248248

249-
@end
249+
@end

0 commit comments

Comments
 (0)