This commit is contained in:
Frank Denis 2018-02-19 19:31:34 +01:00
parent ba5927633b
commit 0fde986c63
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ func (source *Source) parseV2(prefix string) ([]RegisteredServer, error) {
func PrefetchSourceURL(xTransport *XTransport, urlToPrefetch *URLToPrefetch) error {
in, cached, delayTillNextUpdate, err := fetchWithCache(xTransport, urlToPrefetch.url, urlToPrefetch.cacheFile)
if err == nil && cached == false {
if err == nil && !cached {
AtomicFileWrite(urlToPrefetch.cacheFile, []byte(in))
}
urlToPrefetch.when = time.Now().Add(delayTillNextUpdate)