mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-24 03:40:56 +00:00
fix: additional nil check for workqueue shutdown
This commit is contained in:
committed by
lukasmetzner
parent
ecbda22ea5
commit
2be8c36dba
@@ -163,7 +163,7 @@ func (rc *RouteController) handleNodeUpdate(oldObj, newObj interface{}) {
|
||||
func (rc *RouteController) Run(ctx context.Context, syncPeriod time.Duration, controllerManagerMetrics *controllersmetrics.ControllerManagerMetrics) {
|
||||
defer utilruntime.HandleCrash()
|
||||
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.CloudControllerManagerWatchBasedRoutesReconciliation) {
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.CloudControllerManagerWatchBasedRoutesReconciliation) && rc.workqueue != nil {
|
||||
defer rc.workqueue.ShutDown()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user