![]() There are two writes yet only one read on a non-buffered channel that is created locally and not passed anywhere else. Therefore, it could leak one of its two spawned Goroutines if either: * The provided `f` takes longer than an erroneous result from `waiter.WaitForHealthyKubelet`, or; * The provided `f` completes before an erroneous result from `waiter.WaitForHealthyKubelet`. The fix is to add a one-element buffer so that the channel write happens for the second Goroutine in these cases, allowing it to finish and freeing references to the now-buffered channel, letting it to be GC'd. |
||
---|---|---|
.. | ||
BUILD | ||
clientbacked_dryrun.go | ||
dryrunclient_test.go | ||
dryrunclient.go | ||
idempotency_test.go | ||
idempotency.go | ||
init_dryrun_test.go | ||
init_dryrun.go | ||
wait.go |