Skip to content

Commit

Permalink
Merge pull request #29 from mittwald/fix/memory-leak-channel
Browse files Browse the repository at this point in the history
don't call waitGroupToChannel too often
  • Loading branch information
elenz97 authored Mar 17, 2021
2 parents a064668 + 822583e commit 3c62140
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/proc/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ func (r *Runner) Run(ctx context.Context) error {

r.exec(ctx, &wg, errChan)

wgChan := waitGroupToChannel(&wg)
for {
select {
// wait for them all to finish, or one to fail
case <-waitGroupToChannel(&wg):
case <-wgChan:
return nil

// watch files
Expand Down

0 comments on commit 3c62140

Please sign in to comment.