Merge pull request #35322 from deads2k/controller-14-panic

Automatic merge from submit-queue

prevent panic if resourceversion checked early

Found panic while trying to use this in a separate API server.
pull/6/head
Kubernetes Submit Queue 2016-10-24 13:38:39 -07:00 committed by GitHub
commit 1569a8b04f
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ func (s *sharedIndexInformer) LastSyncResourceVersion() string {
s.startedLock.Lock() s.startedLock.Lock()
defer s.startedLock.Unlock() defer s.startedLock.Unlock()
if s.controller == nil { if s.controller == nil || s.controller.reflector == nil {
return "" return ""
} }
return s.controller.reflector.LastSyncResourceVersion() return s.controller.reflector.LastSyncResourceVersion()