Unverified 提交 27c4b5c8 作者: Whyrusleeping 提交者: GitHub

Merge pull request #4386 from ipfs/fix/session-cancel-deadlock

Buffer response channel to prevent deadlock
......@@ -119,7 +119,7 @@ type interestReq struct {
// block we received) this function will not be called, as the cid will likely
// still be in the interest cache.
func (s *Session) isLiveWant(c *cid.Cid) bool {
resp := make(chan bool)
resp := make(chan bool, 1)
s.interestReqs <- interestReq{
c: c,
resp: resp,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论