Skip to content

Commit

Permalink
Merge pull request #489 from jbenet/fix/bitswap-2015-01-03
Browse files Browse the repository at this point in the history
fix(bitswap/network): return when context is done
  • Loading branch information
jbenet committed Jan 3, 2015
2 parents 85833dc + 4e50a54 commit 3fca10e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exchange/bitswap/network/ipfs_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func (bsnet *impl) FindProvidersAsync(ctx context.Context, k util.Key, max int)
bsnet.host.Peerstore().AddAddresses(info.ID, info.Addrs)
select {
case <-ctx.Done():
return
case out <- info.ID:
}
}
Expand Down

0 comments on commit 3fca10e

Please sign in to comment.