fix race condition collecting pulled images IDs

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2022-12-07 11:06:07 +01:00 committed by Guillaume Lours
parent 804d7163a7
commit a73dce44b3
1 changed files with 1 additions and 4 deletions

View File

@ -294,15 +294,12 @@ func (s *composeService) pullRequiredImages(ctx context.Context, project *types.
return err
})
}
err := eg.Wait()
for i, service := range needPull {
if pulledImages[i] != "" {
images[service.Image] = pulledImages[i]
}
}
err := eg.Wait()
if err != nil {
return err
}
return err
})
}