Skip to content

Commit

Permalink
Use defer wg.Done() in FieldSet Dispatch (#2861)
Browse files Browse the repository at this point in the history
  • Loading branch information
UnAfraid authored Dec 13, 2023
1 parent 24ea195 commit 7dd971c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql/fieldset.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func (m *FieldSet) Dispatch(ctx context.Context) {
for _, d := range m.delayed[1:] {
wg.Add(1)
go func(d delayedResult) {
defer wg.Done()
m.Values[d.i] = d.f(ctx)
wg.Done()
}(d)
}

Expand Down

0 comments on commit 7dd971c

Please sign in to comment.