mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
defer Done call
safer in case of panic
This commit is contained in:
parent
8c23f06aaa
commit
517df8f305
@ -185,8 +185,8 @@ func (c *controller[T]) Run(ctx context.Context) error {
|
||||
for i := uint(0); i < c.options.Workers; i++ {
|
||||
waitGroup.Add(1)
|
||||
go func() {
|
||||
defer waitGroup.Done()
|
||||
wait.Until(c.runWorker, time.Second, ctx.Done())
|
||||
waitGroup.Done()
|
||||
}()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user