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++ {