summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go/tools/cache/controller.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/client-go/tools/cache/controller.go')
-rw-r--r--vendor/k8s.io/client-go/tools/cache/controller.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go
index 2c97b8658..e7b98befa 100644
--- a/vendor/k8s.io/client-go/tools/cache/controller.go
+++ b/vendor/k8s.io/client-go/tools/cache/controller.go
@@ -116,7 +116,10 @@ func (c *controller) Run(stopCh <-chan struct{}) {
c.reflector = r
c.reflectorMutex.Unlock()
- r.RunUntil(stopCh)
+ var wg wait.Group
+ defer wg.Wait()
+
+ wg.StartWithChannel(stopCh, r.Run)
wait.Until(c.processLoop, time.Second, stopCh)
}