mirror of
https://github.com/rancher/os.git
synced 2025-09-12 21:23:13 +00:00
Wait for default gateway before loading resource from network
This commit is contained in:
@@ -101,10 +101,13 @@ func LoadFromNetworkWithCache(location string) ([]byte, error) {
|
||||
}
|
||||
|
||||
func LoadFromNetwork(location string) ([]byte, error) {
|
||||
SetProxyEnvironmentVariables()
|
||||
|
||||
var err error
|
||||
|
||||
if err = AllDefaultGWOK(DefaultRoutesCheckTimeout); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
SetProxyEnvironmentVariables()
|
||||
|
||||
var resp *http.Response
|
||||
log.Debugf("LoadFromNetwork(%s)", location)
|
||||
resp, err = http.Get(location)
|
||||
|
Reference in New Issue
Block a user