Skip to content

Commit

Permalink
fix: allow event emitting to happen in parallel with getting the quer…
Browse files Browse the repository at this point in the history
…y channel
  • Loading branch information
aschmahmann committed Nov 8, 2023
1 parent 068f176 commit f60b10c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/commands/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ var findProvidersRoutingCmd = &cmds.Command{
ctx, cancel := context.WithCancel(req.Context)
ctx, events := routing.RegisterForQueryEvents(ctx)

pchan := n.Routing.FindProvidersAsync(ctx, c, numProviders)

go func() {
defer cancel()
pchan := n.Routing.FindProvidersAsync(ctx, c, numProviders)

Check warning on line 85 in core/commands/routing.go

View check run for this annotation

Codecov / codecov/patch

core/commands/routing.go#L85

Added line #L85 was not covered by tests
for p := range pchan {
np := p
routing.PublishQueryEvent(ctx, &routing.QueryEvent{
Expand Down

0 comments on commit f60b10c

Please sign in to comment.