From f7774803b6a3854acd837fdb78d9a215d1a06465 Mon Sep 17 00:00:00 2001 From: Murat Kabilov Date: Mon, 17 Jul 2017 10:37:14 +0200 Subject: [PATCH] get rid of unnecessary goroutines --- pkg/controller/controller.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 339ea183b..d273a50c6 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -146,15 +146,11 @@ func (c *Controller) initController() { func (c *Controller) runPodInformer(stopCh <-chan struct{}, wg *sync.WaitGroup) { defer wg.Done() - go c.podInformer.Run(stopCh) - - <-stopCh + c.podInformer.Run(stopCh) } func (c *Controller) runPostgresqlInformer(stopCh <-chan struct{}, wg *sync.WaitGroup) { defer wg.Done() - go c.postgresqlInformer.Run(stopCh) - - <-stopCh + c.postgresqlInformer.Run(stopCh) }