Skip to content

Commit

Permalink
Fix deadlock in WithServicesTransform
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed May 16, 2024
1 parent 3b30ce3 commit 197e635
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,12 @@ func (p *Project) WithServicesTransform(fn func(name string, s ServiceConfig) (S
name string
service ServiceConfig
}
resultCh := make(chan result)
expect := len(p.Services)
resultCh := make(chan result, expect)
newProject := p.deepCopy()

eg, ctx := errgroup.WithContext(context.Background())
eg.Go(func() error {
expect := len(newProject.Services)
s := Services{}
for expect > 0 {
select {
Expand Down

0 comments on commit 197e635

Please sign in to comment.