diff options
Diffstat (limited to 'plugins/memory/kv.go')
-rw-r--r-- | plugins/memory/kv.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/memory/kv.go b/plugins/memory/kv.go index 83f6630e..c13c2314 100644 --- a/plugins/memory/kv.go +++ b/plugins/memory/kv.go @@ -223,7 +223,7 @@ func (s *Driver) gc() { return case now := <-ticker.C: // mutes needed to clear the map - s.clearMu.Lock() + s.clearMu.RLock() // check every second s.heap.Range(func(key, value interface{}) bool { @@ -244,7 +244,7 @@ func (s *Driver) gc() { return true }) - s.clearMu.Unlock() + s.clearMu.RUnlock() } } } |