From 50e74c439c59ad3031dea3cab9f3931e0d1c02d5 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 26 Feb 2021 23:03:57 +0200 Subject: [PATCH] lib/promscrape: typo fix after ed8441ec5240f3cd2d70c6372f1b13b8761c83f5 --- lib/promscrape/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/promscrape/config.go b/lib/promscrape/config.go index 351637cf9..11a452ae0 100644 --- a/lib/promscrape/config.go +++ b/lib/promscrape/config.go @@ -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 }