Skip to content

Commit 60b4cf2

Browse files
authored
Merge d6e6eed into 3f5972f
2 parents 3f5972f + d6e6eed commit 60b4cf2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

FirebaseRemoteConfig/Sources/RCNConfigRealtime.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,16 +688,17 @@ - (FIRConfigUpdateListenerRegistration *)addConfigUpdateListener:
688688
if (listener == nil) {
689689
return nil;
690690
}
691+
__block id listenerCopy = listener;
691692

692693
__weak RCNConfigRealtime *weakSelf = self;
693694
dispatch_async(_realtimeLockQueue, ^{
694695
__strong RCNConfigRealtime *strongSelf = weakSelf;
695-
[strongSelf->_listeners addObject:listener];
696+
[strongSelf->_listeners addObject:listenerCopy];
696697
[strongSelf beginRealtimeStream];
697698
});
698699

699700
return [[FIRConfigUpdateListenerRegistration alloc] initWithClient:self
700-
completionHandler:listener];
701+
completionHandler:listenerCopy];
701702
}
702703

703704
- (void)removeConfigUpdateListener:(void (^_Nonnull)(FIRRemoteConfigUpdate *configUpdate,

0 commit comments

Comments
 (0)