From 453a3d6b3f42d193931aa51a824ec28c8efe976b Mon Sep 17 00:00:00 2001 From: Jan Broer Date: Thu, 18 Feb 2016 20:37:07 +0100 Subject: [PATCH] Declare own HTTP client --- acme/dns_challenge_cloudflare.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/acme/dns_challenge_cloudflare.go b/acme/dns_challenge_cloudflare.go index f6eea687..f55c28bd 100644 --- a/acme/dns_challenge_cloudflare.go +++ b/acme/dns_challenge_cloudflare.go @@ -163,9 +163,7 @@ func (c *DNSProviderCloudFlare) makeRequest(method, uri string, body io.Reader) req.Header.Set("X-Auth-Key", c.authKey) req.Header.Set("User-Agent", userAgent()) - client := http.DefaultClient - client.Timeout = time.Duration(30 * time.Second) - + client := http.Client{Timeout: 30 * time.Second} resp, err := client.Do(req) if err != nil { return nil, fmt.Errorf("Error querying API -> %v", err)