Nits
This commit is contained in:
parent
ba5927633b
commit
0fde986c63
|
@ -291,7 +291,7 @@ func (source *Source) parseV2(prefix string) ([]RegisteredServer, error) {
|
||||||
|
|
||||||
func PrefetchSourceURL(xTransport *XTransport, urlToPrefetch *URLToPrefetch) error {
|
func PrefetchSourceURL(xTransport *XTransport, urlToPrefetch *URLToPrefetch) error {
|
||||||
in, cached, delayTillNextUpdate, err := fetchWithCache(xTransport, urlToPrefetch.url, urlToPrefetch.cacheFile)
|
in, cached, delayTillNextUpdate, err := fetchWithCache(xTransport, urlToPrefetch.url, urlToPrefetch.cacheFile)
|
||||||
if err == nil && cached == false {
|
if err == nil && !cached {
|
||||||
AtomicFileWrite(urlToPrefetch.cacheFile, []byte(in))
|
AtomicFileWrite(urlToPrefetch.cacheFile, []byte(in))
|
||||||
}
|
}
|
||||||
urlToPrefetch.when = time.Now().Add(delayTillNextUpdate)
|
urlToPrefetch.when = time.Now().Add(delayTillNextUpdate)
|
||||||
|
|
Loading…
Reference in New Issue