watchcache: currentCapacity acquires read lock

This commit is contained in:
Lukasz Szaszkiewicz 2023-04-07 10:16:46 +02:00
parent ad18954259
commit f138d29bf2

View File

@ -608,8 +608,8 @@ func (w *watchCache) Resync() error {
}
func (w *watchCache) currentCapacity() int {
w.Lock()
defer w.Unlock()
w.RLock()
defer w.RUnlock()
return w.capacity
}