mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
prevent panic if resourceversion checked early
This commit is contained in:
parent
6bda989d54
commit
fd65bc8fff
2
pkg/client/cache/shared_informer.go
vendored
2
pkg/client/cache/shared_informer.go
vendored
@ -207,7 +207,7 @@ func (s *sharedIndexInformer) LastSyncResourceVersion() string {
|
||||
s.startedLock.Lock()
|
||||
defer s.startedLock.Unlock()
|
||||
|
||||
if s.controller == nil {
|
||||
if s.controller == nil || s.controller.reflector == nil {
|
||||
return ""
|
||||
}
|
||||
return s.controller.reflector.LastSyncResourceVersion()
|
||||
|
Loading…
Reference in New Issue
Block a user