mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 15:42:21 +08:00
Fix goroutine leak in dag put
License: MIT Signed-off-by: Alec Brickner <alecjbrick@gmail.com>
This commit is contained in:
@ -128,7 +128,12 @@ into an object of the specified format.
|
||||
|
||||
cid := nds[0].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 {
|
||||
|
Reference in New Issue
Block a user