Remove unused arg of kubeadm/WaitForKubeletAndFunc

This commit is contained in:
Monokaix 2021-12-24 18:46:25 +08:00
parent 65ac7f09ec
commit eab74f15a5

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