1
0
mirror of https://github.com/rancher/os.git synced 2025-07-13 14:44:03 +00:00

Merge pull request #994 from joshwget/fix-network-caching

Fix network caching
This commit is contained in:
Darren Shepherd 2016-06-13 13:30:14 -07:00 committed by GitHub
commit 42ef7c062a

View File

@ -55,6 +55,11 @@ func getServices(urls []string, key string) ([]string, error) {
} }
func loadFromNetwork(location string) ([]byte, error) { func loadFromNetwork(location string) ([]byte, error) {
bytes := cacheLookup(location)
if bytes != nil {
return bytes, nil
}
var err error var err error
for i := 0; i < 300; i++ { for i := 0; i < 300; i++ {
net.UpdateDnsConf() net.UpdateDnsConf()