mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-26 23:17:34 +00:00
perform nil check before iterating over keys
Kubernetes-commit: 1fcd410d4ae9b8dbe3cf5d340582f078abc7b2b4
This commit is contained in:
parent
77fb8363ad
commit
3df32f530e
4
tools/cache/delta_fifo.go
vendored
4
tools/cache/delta_fifo.go
vendored
@ -539,6 +539,10 @@ func (f *DeltaFIFO) Resync() error {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
if f.knownObjects == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
keys := f.knownObjects.ListKeys()
|
||||
for _, k := range keys {
|
||||
if err := f.syncKeyLocked(k); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user