Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 998dbf7

Browse files
committed
Avoid using for variable in go func, as this creates race conditions
Signed-off-by: Guillaume Tardif <[email protected]>
1 parent 76f10e1 commit 998dbf7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

local/compose/convergence.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ func getContainerProgressName(container moby.Container) string {
147147
func (s *composeService) waitDependencies(ctx context.Context, project *types.Project, service types.ServiceConfig) error {
148148
eg, _ := errgroup.WithContext(ctx)
149149
for dep, config := range service.DependsOn {
150+
dep, config := dep, config
150151
eg.Go(func() error {
151152
ticker := time.NewTicker(500 * time.Millisecond)
152153
defer ticker.Stop()

0 commit comments

Comments
 (0)