mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
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.
This commit is contained in:
commit
1569a8b04f
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()
|
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()
|
||||||
|
Loading…
Reference in New Issue
Block a user