Skip to content

Commit

Permalink
Update the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Aug 26, 2024
1 parent 65c324f commit cd5f603
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,9 @@ func rateLimitBackoff(min, max time.Duration, attemptNum int, resp *http.Respons
}
}
} else {
// For each attempt without the header, back off an additiona 100% exponentially. With the default milliseconds
// being set to 100 for `min`, this makes the 5th retry wait 3.2 seconds (3,200 ms) by default
// In case the RateLimit-Reset header is not set, back off an additional
// 100% exponentially. With the default milliseconds being set to 100 for
// `min`, this makes the 5th retry wait 3.2 seconds (3,200 ms) by default.
min = time.Duration(float64(min) * math.Pow(2, float64(attemptNum)))
}
}
Expand Down

0 comments on commit cd5f603

Please sign in to comment.