Skip to content

Commit b8af7e4

Browse files
Merge pull request #339 from LalatenduMohanty/Remove_todo_77170
Using optr.queue.ShutDown directly as upstream K8s is fixed now
2 parents 914467c + 94be9ea commit b8af7e4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/cvo/cvo.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,7 @@ func loadConfigMapVerifierDataFromUpdate(update *payload.Update, clientBuilder v
323323
// Run runs the cluster version operator until stopCh is completed. Workers is ignored for now.
324324
func (optr *Operator) Run(ctx context.Context, workers int) {
325325
defer utilruntime.HandleCrash()
326-
// TODO: when Kube 77170 is fixed we can remove the use of the once here
327-
var shutdownOnce sync.Once
328-
defer shutdownOnce.Do(func() { optr.queue.ShutDown() })
326+
defer optr.queue.ShutDown()
329327
stopCh := ctx.Done()
330328
workerStopCh := make(chan struct{})
331329

@@ -361,7 +359,7 @@ func (optr *Operator) Run(ctx context.Context, workers int) {
361359
<-stopCh
362360

363361
// stop the queue, then wait for the worker to exit
364-
shutdownOnce.Do(func() { optr.queue.ShutDown() })
362+
optr.queue.ShutDown()
365363
<-workerStopCh
366364
}
367365

0 commit comments

Comments
 (0)