mirror of https://github.com/k3s-io/k3s
perform nil check before iterating over keys
parent
efe6180806
commit
1fcd410d4a
|
@ -539,6 +539,10 @@ func (f *DeltaFIFO) Resync() error {
|
||||||
f.lock.Lock()
|
f.lock.Lock()
|
||||||
defer f.lock.Unlock()
|
defer f.lock.Unlock()
|
||||||
|
|
||||||
|
if f.knownObjects == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
keys := f.knownObjects.ListKeys()
|
keys := f.knownObjects.ListKeys()
|
||||||
for _, k := range keys {
|
for _, k := range keys {
|
||||||
if err := f.syncKeyLocked(k); err != nil {
|
if err := f.syncKeyLocked(k); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue