1
0
mirror of https://github.com/rancher/os.git synced 2025-05-07 23:56:19 +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"
"fmt"
"io/ioutil"
"net"
"os"
"strings"
@ -108,6 +109,7 @@ func LoadFromNetwork(location string) ([]byte, error) {
}
SetProxyEnvironmentVariables()
net.DefaultResolver.PreferGo = true
cfg := config.LoadConfig()
client := httpRetry.NewHTTPClient()
client.MaxRetries = cfg.Rancher.HTTPLoadRetries