Remove conditional around rate limiting

Always limit LE requests to ~18 per second, no matter how many domains are being validated.
This commit is contained in:
Unknown 2017-03-30 02:06:43 +02:00
parent 0e2937900b
commit ee0018c855

View file

@ -529,10 +529,7 @@ func (c *Client) chooseSolvers(auth authorization, domain string) map[int]solver
func (c *Client) getChallenges(domains []string) ([]authorizationResource, map[string]error) {
resc, errc := make(chan authorizationResource), make(chan domainError)
var delay time.Duration
if len(domains) > overallRequestLimit {
delay = time.Second / overallRequestLimit
}
delay := time.Second / overallRequestLimit
for _, domain := range domains {
time.Sleep(delay)