Utilize reflectorMutex in LastSyncResourceVersion

This commit is contained in:
Ted Yu 2019-08-26 07:46:26 -07:00 committed by Ted Yu
parent 518ff2a405
commit 4f54538ae8

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