diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 8601a4203..5ab0e0fef 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -179,7 +179,7 @@ func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) { for i := range c.clusterEventQueues { wg.Add(1) - go c.processClusterEventsQueue(stopCh, i, wg) + go c.processClusterEventsQueue(i, stopCh, wg) } c.logger.Info("Started working in background") diff --git a/pkg/controller/postgresql.go b/pkg/controller/postgresql.go index f0161ae97..c832476f7 100644 --- a/pkg/controller/postgresql.go +++ b/pkg/controller/postgresql.go @@ -228,7 +228,7 @@ func (c *Controller) processEvent(obj interface{}) error { return nil } -func (c *Controller) processClusterEventsQueue(stopCh <-chan struct{}, idx int, wg *sync.WaitGroup) { +func (c *Controller) processClusterEventsQueue(idx int, stopCh <-chan struct{}, wg *sync.WaitGroup) { defer wg.Done() go func() {