NAMEDOTCOM: Increase timeout (#1382)

This commit is contained in:
Tom Limoncelli 2022-01-27 13:10:57 -05:00 committed by GitHub
parent 360a6266c5
commit c8438b3483
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ package namedotcom
import (
"encoding/json"
"fmt"
"time"
"github.com/namedotcom/go/namecom"
@ -50,6 +51,13 @@ func newProvider(conf map[string]string) (*namedotcomProvider, error) {
if api.APIUrl == "" {
api.APIUrl = defaultAPIBase
}
// Set the timeout to a high value. Currently we get timeouts and
// the namecom library doesn't make it easy to do a clean
// retry-on-timeout or retry-on-429. As a work-around we just give
// it more time to finish.
api.client.Client.Timeout = 60 * time.Second
return api, nil
}