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 authored and hacdias committed Nov 8, 2023
1 parent 587637a commit 00f93c6
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 @@ -81,10 +81,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)
for p := range pchan {
np := p
routing.PublishQueryEvent(ctx, &routing.QueryEvent{
Expand Down

0 comments on commit 00f93c6

Please sign in to comment.