From 9e0c21c439417202eff257b95e33868de703825c Mon Sep 17 00:00:00 2001 From: xenolf Date: Thu, 19 May 2016 18:51:47 +0200 Subject: [PATCH] Add HTTPTimeout variable to http.go. This lets users of this library override the default internal timeout for HTTP requests issued by the library. The default is 10 seconds. --- acme/http.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acme/http.go b/acme/http.go index 410aead6..3b5a37cb 100644 --- a/acme/http.go +++ b/acme/http.go @@ -14,8 +14,11 @@ import ( // UserAgent (if non-empty) will be tacked onto the User-Agent string in requests. var UserAgent string +// HTTPTimeout is used to override the default HTTP timeout of 10 seconds. +var HTTPTimeout = 10 * time.Second + // defaultClient is an HTTP client with a reasonable timeout value. -var defaultClient = http.Client{Timeout: 10 * time.Second} +var defaultClient = http.Client{Timeout: HTTPTimeout} const ( // defaultGoUserAgent is the Go HTTP package user agent string. Too