Skip to content

Commit

Permalink
Don't cache FCM registration token operations. (#14355)
Browse files Browse the repository at this point in the history
  • Loading branch information
leojaygoogle authored Jan 16, 2025
1 parent a34d7ae commit 8d75fef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions FirebaseMessaging/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased
- [fixed] Don't cache FCM registration token operations. (#14352).

# 11.5.0
- [fixed] Improve token-fetch failure logging with detailed error info. (#13997).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ - (void)performTokenOperation {
[self handleResponseWithData:data response:response error:error];
};

NSURLSessionConfiguration *config = NSURLSessionConfiguration.defaultSessionConfiguration;
NSURLSessionConfiguration *config = NSURLSessionConfiguration.ephemeralSessionConfiguration;
config.timeoutIntervalForResource = 60.0f; // 1 minute
NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
self.dataTask = [session dataTaskWithRequest:request completionHandler:requestHandler];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ - (void)performTokenOperation {
FIRMessaging_STRONGIFY(self);
[self handleResponseWithData:data response:response error:error];
};
NSURLSessionConfiguration *config = NSURLSessionConfiguration.defaultSessionConfiguration;
NSURLSessionConfiguration *config = NSURLSessionConfiguration.ephemeralSessionConfiguration;
config.timeoutIntervalForResource = 60.0f; // 1 minute
NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
self.dataTask = [session dataTaskWithRequest:request completionHandler:requestHandler];
Expand Down

0 comments on commit 8d75fef

Please sign in to comment.