Skip to content

Commit

Permalink
fix recently added context leak
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Apr 22, 2021
1 parent 2e4f97c commit 751772f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/commands/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ var queryDhtCmd = &cmds.Command{
}

ctx, cancel := context.WithCancel(req.Context)
defer cancel()
ctx, events := routing.RegisterForQueryEvents(ctx)

if d, ok := nd.DHTClient.(kademlia); ok {
Expand Down

0 comments on commit 751772f

Please sign in to comment.