mirror of https://github.com/k3s-io/k3s
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
commit
1569a8b04f
|
@ -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