Merge pull request #107217 from Monokaix/used-arg-in-kubeadm/WaitForHealthyKubelet

Remove unused arg of kubeadm/WaitForKubeletAndFunc
This commit is contained in:
Kubernetes Prow Robot 2022-01-03 12:33:02 -08:00 committed by GitHub
commit 3bce0502aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,11 +166,11 @@ func (w *KubeWaiter) WaitForKubeletAndFunc(f func() error) error {
}
}(errorChan, w)
go func(errC chan error, waiter Waiter) {
go func(errC chan error) {
// This main goroutine sends whatever the f function returns (error or not) to the channel
// This in order to continue on success (nil error), or just fail if the function returns an error
errC <- f()
}(errorChan, w)
}(errorChan)
// This call is blocking until one of the goroutines sends to errorChan
return <-errorChan