Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions FirebaseRemoteConfig/Sources/RCNConfigFetch.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,31 +208,6 @@ - (void)realtimeFetchConfigWithNoExpirationDuration:(NSInteger)fetchAttemptNumbe
if (strongSelf == nil) {
return;
}

// Check if a fetch is already in progress.
// TODO: for this case should we still return a SUCCESS status?
if (strongSelf->_settings.isFetchInProgress) {
// Check if we have some fetched data.
if (strongSelf->_settings.lastFetchTimeInterval > 0) {
FIRLogDebug(kFIRLoggerRemoteConfig, @"I-RCN000052",
@"A fetch is already in progress. Using previous fetch results.");
FIRRemoteConfigUpdate *update =
[self->_content getConfigUpdateForNamespace:self->_FIRNamespace];
return [strongSelf reportCompletionWithStatus:strongSelf->_settings.lastFetchStatus
withUpdate:update
withError:nil
completionHandler:nil
updateCompletionHandler:completionHandler];
} else {
FIRLogError(kFIRLoggerRemoteConfig, @"I-RCN000053",
@"A fetch is already in progress. Ignoring duplicate request.");
return [strongSelf reportCompletionWithStatus:FIRRemoteConfigFetchStatusFailure
withUpdate:nil
withError:nil
completionHandler:nil
updateCompletionHandler:completionHandler];
}
}
// Check whether cache data is within throttle limit.
if ([strongSelf->_settings shouldThrottle] && !hasDeviceContextChanged) {
// Must set lastFetchStatus before FailReason.
Expand Down