From ee0018c855fa43a43f29280a5be2e4b94f9ac991 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 30 Mar 2017 02:06:43 +0200 Subject: [PATCH] Remove conditional around rate limiting Always limit LE requests to ~18 per second, no matter how many domains are being validated. --- acme/client.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/acme/client.go b/acme/client.go index ee519f2e..ef0f80b7 100644 --- a/acme/client.go +++ b/acme/client.go @@ -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)