Commit ccf6d93b authored by Brian Tiger Chow's avatar Brian Tiger Chow

rm unnecessary concurrency

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent c0f399b9
......@@ -284,13 +284,11 @@ func (bs *bitswap) ReceiveMessage(ctx context.Context, p peer.Peer, incoming bsm
// and number of bytes transfered.
bs.strategy.MessageReceived(p, incoming)
go func() {
for _, block := range incoming.Blocks() {
if err := bs.HasBlock(ctx, block); err != nil {
log.Error(err)
}
for _, block := range incoming.Blocks() {
if err := bs.HasBlock(ctx, block); err != nil {
log.Error(err)
}
}()
}
for _, key := range incoming.Wantlist() {
if bs.strategy.ShouldSendBlockToPeer(key, p) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment