Fix source cache

This commit is contained in:
Frank Denis 2018-01-14 00:20:22 +01:00
parent 5a65a3a084
commit 4fef1a705c
1 changed files with 4 additions and 4 deletions

View File

@ -44,10 +44,11 @@ func fetchWithCache(url string, cacheFile string, refreshDelay time.Duration) (i
}
if usableCache {
bin, err = fetchFromCache(cacheFile)
if err != nil {
return
if err == nil {
cached = true
}
} else {
}
if !cached {
var resp *http.Response
dlog.Infof("Loading source information from URL [%s]", url)
resp, err = http.Get(url)
@ -69,7 +70,6 @@ func fetchWithCache(url string, cacheFile string, refreshDelay time.Duration) (i
return
}
}
cached = true
}
in = string(bin)
return