lib/promscrape: typo fix after ed8441ec52

This commit is contained in:
Aliaksandr Valialkin 2021-02-26 23:03:57 +02:00
parent e38ca28d99
commit 50e74c439c

View file

@ -563,7 +563,9 @@ func (swc *scrapeWorkCache) Get(key string) *ScrapeWork {
currentTime := fasttime.UnixTimestamp()
swc.mu.Lock()
swe := swc.m[key]
swe.lastAccessTime = currentTime
if swe != nil {
swe.lastAccessTime = currentTime
}
swc.mu.Unlock()
return swe.sw
}