Skip to content

Commit 42089e3

Browse files
committed
correct the retry_config
1 parent fc7140d commit 42089e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/optimizely/cmab/cmab_client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ def _do_fetch_with_retry(url, request_body, retry_config, timeout)
151151
# The variation ID from the response.
152152

153153
attempt = 0
154-
backoff = @retry_config.retry_delay
154+
backoff = retry_config.retry_delay
155155
begin
156156
_do_fetch(url, request_body, timeout)
157157
rescue => e
158-
if attempt < @retry_config.max_retries
158+
if attempt < retry_config.max_retries
159159
@logger.log(Logger::INFO, "Retrying CMAB request (attempt #{attempt + 1}) after #{backoff} seconds...")
160160
Kernel.sleep(backoff)
161161
attempt += 1
162-
backoff = [backoff * @retry_config.backoff_multiplier, @retry_config.max_backoff].min
162+
backoff = [backoff * retry_config.backoff_multiplier, retry_config.max_backoff].min
163163
retry
164164
else
165165
@logger.log(Logger::ERROR, "Max retries exceeded for CMAB request: #{e.message}")

0 commit comments

Comments
 (0)