1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

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

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
}