Unverified Commit 6f140d25 authored by Whyrusleeping's avatar Whyrusleeping Committed by GitHub

Merge pull request #5258 from ipfs/fix/5247

when sending blocks in bitswap, close streams asynchronously
parents 256ad270 3e306586
......@@ -123,9 +123,10 @@ func (bsnet *impl) SendMessage(
s.Reset()
return err
}
// Yes, return this error. We have no reason to believe that the block
// was actually *sent* unless we see the EOF.
return inet.FullClose(s)
// TODO(https://github.com/libp2p/go-libp2p-net/issues/28): Avoid this goroutine.
go inet.AwaitEOF(s)
return s.Close()
}
func (bsnet *impl) SetDelegate(r Receiver) {
......
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