1
0
mirror of https://github.com/rancher/os.git synced 2025-06-02 11:56:09 +00:00

Prefer to use go dns

This commit is contained in:
niusmallnan 2019-12-20 16:13:31 +08:00 committed by niusmallnan
parent 71623750fc
commit 7b8c79bbdf

View File

@ -4,6 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"net"
"os" "os"
"strings" "strings"
@ -108,6 +109,7 @@ func LoadFromNetwork(location string) ([]byte, error) {
} }
SetProxyEnvironmentVariables() SetProxyEnvironmentVariables()
net.DefaultResolver.PreferGo = true
cfg := config.LoadConfig() cfg := config.LoadConfig()
client := httpRetry.NewHTTPClient() client := httpRetry.NewHTTPClient()
client.MaxRetries = cfg.Rancher.HTTPLoadRetries client.MaxRetries = cfg.Rancher.HTTPLoadRetries