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
commit 9a5dc8f082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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