fix: additional nil check for workqueue shutdown

This commit is contained in:
lukasmetzner
2025-10-30 17:18:44 +01:00
committed by lukasmetzner
parent ecbda22ea5
commit 2be8c36dba

View File

@@ -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()
}