kubernetes/cmd/kubeadm/app/util/apiclient
Louis Jackman 62e314a556
Remove potential Goroutine leak in kubeadm wait.go
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.
2019-11-08 21:05:19 +00:00
..
BUILD remove ipallocator in favor of k/utils net package 2019-10-22 18:37:13 +02:00
clientbacked_dryrun.go error-imports-cleanups 2019-01-03 13:25:18 +01:00
dryrunclient_test.go kubeadm: use T.Run API in app/util 2018-12-29 18:27:38 +02:00
dryrunclient.go cleanup: fix typo "contstruct" -> "construct" 2019-08-06 06:22:46 +08:00
idempotency_test.go cleanup: fix some log and error capitalizations 2019-07-20 18:26:16 -04:00
idempotency.go skip deployment update if migration fails 2019-11-06 10:55:54 -05:00
init_dryrun_test.go kubeadm cleanup: master -> control-plane (cont.3) 2019-02-23 10:19:26 +07:00
init_dryrun.go remove ipallocator in favor of k/utils net package 2019-10-22 18:37:13 +02:00
wait.go Remove potential Goroutine leak in kubeadm wait.go 2019-11-08 21:05:19 +00:00