Skip to content

Commit

Permalink
fix(providerquerymanager): use find providers async context
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed Feb 15, 2023
1 parent d195f6d commit e9a7c12
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ func (npqm *newProvideQueryMessage) debugMessage() string {
func (npqm *newProvideQueryMessage) handle(pqm *ProviderQueryManager) {
requestStatus, ok := pqm.inProgressRequestStatuses[npqm.k]
if !ok {

ctx, cancelFn := context.WithCancel(pqm.ctx)
// used the passed in context to FindProvidersAsync for this call
ctx, cancelFn := context.WithCancel(npqm.ctx)

Check warning on line 382 in bitswap/client/internal/providerquerymanager/providerquerymanager.go

View check run for this annotation

Codecov / codecov/patch

bitswap/client/internal/providerquerymanager/providerquerymanager.go#L381-L382

Added lines #L381 - L382 were not covered by tests
requestStatus = &inProgressRequestStatus{
listeners: make(map[chan peer.ID]struct{}),
ctx: ctx,
Expand Down

0 comments on commit e9a7c12

Please sign in to comment.