mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #81889 from tedyu/ctrl-rm-refl-mutex
Utilize reflectorMutex in LastSyncResourceVersion
This commit is contained in:
commit
9a5dc8f082
@ -131,6 +131,8 @@ func (c *controller) HasSynced() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *controller) LastSyncResourceVersion() string {
|
func (c *controller) LastSyncResourceVersion() string {
|
||||||
|
c.reflectorMutex.RLock()
|
||||||
|
defer c.reflectorMutex.RUnlock()
|
||||||
if c.reflector == nil {
|
if c.reflector == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user