Unverified 提交 06f11bd8 作者: Whyrusleeping 提交者: GitHub

Merge pull request #5016 from alecbrick/fix/dag-goroutine-leak

Fix goroutine leak in dag put
...@@ -128,7 +128,12 @@ into an object of the specified format. ...@@ -128,7 +128,12 @@ into an object of the specified format.
cid := nds[0].Cid() cid := nds[0].Cid()
cids.Add(cid) cids.Add(cid)
outChan <- &OutputObject{Cid: cid}
select {
case outChan <- &OutputObject{Cid: cid}:
case <-req.Context().Done():
return nil
}
} }
if err := b.Commit(); err != nil { if err := b.Commit(); err != nil {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论