mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 05:34:43 +08:00
NAMEDOTCOM: Increase timeout (#1382)
This commit is contained in:
parent
360a6266c5
commit
c8438b3483
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue