Skip to content

Commit

Permalink
Fix premature cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilner committed Oct 9, 2020
1 parent 9f74718 commit 4ba3d4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file removed pullquote
Binary file not shown.
3 changes: 2 additions & 1 deletion pullquote.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ func listFiles(ctx context.Context, fns []string, r io.Reader, walk bool) (<-cha
}

ctx, cncl := context.WithCancel(ctx)
defer cncl()

var (
wg sync.WaitGroup
Expand Down Expand Up @@ -310,6 +309,8 @@ func listFiles(ctx context.Context, fns []string, r io.Reader, walk bool) (<-cha
}

go func() {
defer cncl()

seen := make(map[string]struct{})

submit := func(path string) {
Expand Down

0 comments on commit 4ba3d4e

Please sign in to comment.