[#84] Fix loop variable capture issue in neofs-node workers

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-08 16:11:34 +03:00 committed by Alex Vanin
parent 0e7e0bd2d6
commit 65a93af176

View file

@ -12,9 +12,9 @@ func startWorkers(c *cfg) {
for _, wrk := range c.workers {
c.wg.Add(1)
go func() {
wrk.Run(c.ctx)
go func(w worker) {
w.Run(c.ctx)
c.wg.Done()
}()
}(wrk)
}
}