aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--provider.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/provider.go b/provider.go
index cc47314..78855f0 100644
--- a/provider.go
+++ b/provider.go
@@ -49,7 +49,6 @@ type Provider struct {
Directory
nonces chan string
http.Client
- http.Transport
}
var (
@@ -64,13 +63,13 @@ const (
mimeJose = "application/jose+json"
mimeProblem = "application/problem+json"
mimePkix = "application/pkix-cert"
- timeout = time.Second * 30
+ timeout = time.Second * 10
poll = time.Second
)
// RoundTrip extracts nonces from HTTP reponse
func (p *Provider) RoundTrip(req *http.Request) (*http.Response, error) {
- resp, err := p.Transport.RoundTrip(req)
+ resp, err := http.DefaultTransport.RoundTrip(req)
if err != nil {
return nil, err
}
@@ -98,10 +97,7 @@ func (p *Provider) Nonce() (string, error) {
// DialProvider fetches directory and initializes first nonce
func DialProvider(directory string) (*Provider, error) {
p := &Provider{nonces: make(chan string, 100)}
- p.Client = http.Client{
- Transport: p,
- Timeout: time.Duration(timeout),
- }
+ p.Client = http.Client{Transport: p}
if directory == "" {
directory = LE1
}