mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 16:28:06 +08:00
rm unnecessary concurrency
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
parent
601a2faa28
commit
ab565474ca
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user