Merge pull request #81889 from tedyu/ctrl-rm-refl-mutex

Utilize reflectorMutex in LastSyncResourceVersion
This commit is contained in:
Kubernetes Prow Robot
2019-08-26 16:43:20 -07:00
committed by GitHub

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 ""
}