From e7e26c934879e83de6fd2738756608965e938716 Mon Sep 17 00:00:00 2001 From: Brandon Stalnaker <33703490+BrandonStalnaker@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:55:27 -0400 Subject: [PATCH] fix: Fix Set Backoff Method (#36) --- mParticleCore.brs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mParticleCore.brs b/mParticleCore.brs index 5558d49..deafbe6 100644 --- a/mParticleCore.brs +++ b/mParticleCore.brs @@ -1205,10 +1205,10 @@ function mParticleStart(options as object, messagePort as object) m.uploadQueue.unshift(transfer.batch) for each header in headers if (header["Retry-After"] <> invalid) then - backoff = header["Retry-After"] + backoff = parsejson(header["Retry-After"]) end if end for - if (backoff <> invalid) then + if (backoff <> invalid and backoff > 0) then m.mpBackoff.setBackoff(backoff) else m.mpBackoff.increase()