Skip to content

Commit

Permalink
Minor formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckCrawford committed Mar 20, 2024
1 parent a192578 commit fbde639
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,9 @@ func (c *Client) doWithEndpoint(
}

resp, respErr = c.doSingleRequest(req, authRequired, headers)
shouldRetry, delay := c.shouldRetry(resp, respErr, attempt)

// Handle retry if applicable
shouldRetry, delay := c.shouldRetry(resp, respErr, attempt)
if !shouldRetry {
break
}
Expand All @@ -636,8 +637,8 @@ func (c *Client) doWithEndpoint(
case <-time.After(delay):
continue
case <-ctx.Done():
respErr = fmt.Errorf("context completed during retry: %w", ctx.Err())
return nil, respErr
err = fmt.Errorf("context completed during retry: %w", ctx.Err())
return nil, err
}
}

Expand Down

0 comments on commit fbde639

Please sign in to comment.