Skip to content

Commit

Permalink
fixup! fixup! OSMessagingController Retry Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Gomez Palacio committed Oct 18, 2024
1 parent 279cce6 commit 32cf760
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ - (void)getInAppMessagesFromServer:(NSString *)subscriptionId {
OSIamFetchReadyCondition *condition = [OSIamFetchReadyCondition sharedInstanceWithId:onesignalId];
OSReadYourWriteData *rywData = [consistencyManager getRywTokenFromAwaitableCondition:condition forId:onesignalId];

// We need to delay the first request by however long the backend is telling us (`ryw_delay`)
// This will help avoid unnecessary retries & can be easily adjusted from the backend
NSTimeInterval rywDelayInSeconds;
if (rywData.rywDelay) {
rywDelayInSeconds = [rywData.rywDelay doubleValue] / 1000.0;
Expand Down

0 comments on commit 32cf760

Please sign in to comment.