mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
watchcache: currentCapacity acquires read lock
This commit is contained in:
parent
ad18954259
commit
f138d29bf2
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user