From 9e8938b312a68ceaea09121c8519df25e178935f Mon Sep 17 00:00:00 2001 From: Gus <8219721+srfrog@users.noreply.github.com> Date: Mon, 4 Feb 2019 18:43:14 -0700 Subject: [PATCH] fixed bug with backup fan-out code (#2973) --- worker/backup_ee.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker/backup_ee.go b/worker/backup_ee.go index 71595ec5c7c..c763627787d 100644 --- a/worker/backup_ee.go +++ b/worker/backup_ee.go @@ -120,10 +120,10 @@ func BackupOverNetwork(pctx context.Context, dst string) error { // If we receive any failures, we cancel the process. errCh := make(chan error, 1) for _, gid := range gids { - req.GroupId = gid - go func() { + go func(gid uint32) { + req.GroupId = gid errCh <- backupGroup(ctx, req) - }() + }(gid) } for i := 0; i < len(gids); i++ {