From 8e770944d155d21b727f73ccf5256ac60314188f Mon Sep 17 00:00:00 2001 From: changzhen Date: Thu, 22 Jul 2021 17:38:11 +0800 Subject: [PATCH] drop nil key Signed-off-by: changzhen --- pkg/util/worker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/util/worker.go b/pkg/util/worker.go index 6da7affd0..b9347e6fc 100644 --- a/pkg/util/worker.go +++ b/pkg/util/worker.go @@ -107,6 +107,10 @@ func (w *asyncWorker) EnqueueRateLimited(obj runtime.Object) { return } + if key == nil { + return + } + w.AddRateLimited(key) }