Utilize reflectorMutex in LastSyncResourceVersion

Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
This commit is contained in:
Ted Yu 2019-08-26 07:46:26 -07:00 committed by Kubernetes Publisher
parent cc5a7c7149
commit 541253da74

View File

@ -131,6 +131,8 @@ func (c *controller) HasSynced() bool {
}
func (c *controller) LastSyncResourceVersion() string {
c.reflectorMutex.RLock()
defer c.reflectorMutex.RUnlock()
if c.reflector == nil {
return ""
}