You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: OneSignalSDK/onesignal/in-app-messages/src/main/java/com/onesignal/inAppMessages/internal/backend/impl/InAppBackendService.kt
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -204,11 +204,11 @@ internal class InAppBackendService(
204
204
rywToken:String?,
205
205
sessionDurationProvider: () ->Long,
206
206
): List<InAppMessage>? {
207
-
var attempts =1
208
-
var retryLimit:Int?=null//Retry limit will be determined dynamically
207
+
var attempts =0
208
+
var retryLimit:Int=0//retry limit is remote defined & set dynamically below
209
209
210
-
while (retryLimit ==null|| attempts <= retryLimit +1) {
211
-
val retryCount =if (attempts >1) attempts-1elsenull
210
+
do {
211
+
val retryCount =if (attempts >0) attempts elsenull
212
212
val values =
213
213
OptionalHeaders(
214
214
rywToken = rywToken,
@@ -221,13 +221,12 @@ internal class InAppBackendService(
221
221
val jsonResponse = response.payload?.let { JSONObject(it) }
0 commit comments