Skip to content

Commit 32cf760

Browse files
author
Rodrigo Gomez Palacio
committed
fixup! fixup! OSMessagingController Retry Logic
1 parent 279cce6 commit 32cf760

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Controller/OSMessagingController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ - (void)getInAppMessagesFromServer:(NSString *)subscriptionId {
267267
OSIamFetchReadyCondition *condition = [OSIamFetchReadyCondition sharedInstanceWithId:onesignalId];
268268
OSReadYourWriteData *rywData = [consistencyManager getRywTokenFromAwaitableCondition:condition forId:onesignalId];
269269

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

0 commit comments

Comments
 (0)