Browse Source

[RC] Fix a concurrency crash (#14450)

Paul Beusterien 1 năm trước cách đây
mục cha
commit
ba8869c333

+ 4 - 0
FirebaseRemoteConfig/CHANGELOG.md

@@ -1,3 +1,7 @@
+# Unreleased
+- [fixed] Mark internal `fetchSession` property as `atomic` to prevent a concurrency
+  related crash. (#14449)
+
 # 11.8.0
 - [fixed] Mark completion handlers as Sendable in RemoteConfig class.
   Some completions handlers were missed in the 11.7.0 update. (#14257)

+ 1 - 1
FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h

@@ -67,7 +67,7 @@ typedef void (^RCNConfigFetchCompletion)(FIRRemoteConfigFetchStatus status,
 - (void)recreateNetworkSession;
 
 /// Provide fetchSession for tests to override.
-@property(nonatomic, readwrite, strong, nonnull) NSURLSession *fetchSession;
+@property(atomic, readwrite, strong, nonnull) NSURLSession *fetchSession;
 
 /// Provide config template version number for Realtime config client.
 @property(nonatomic, copy, nonnull) NSString *templateVersionNumber;