mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-02 03:28:25 +08:00
adder: fix bug where errors from calls to NewAdder caused daemon to hang
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
This commit is contained in:
@ -202,15 +202,15 @@ You can now refer to the added file in a gateway, like so:
|
||||
bserv := blockservice.New(addblockstore, exch)
|
||||
dserv := dag.NewDAGService(bserv)
|
||||
|
||||
outChan := make(chan interface{}, 8)
|
||||
res.SetOutput((<-chan interface{})(outChan))
|
||||
|
||||
fileAdder, err := coreunix.NewAdder(req.Context(), n.Pinning, n.Blockstore, dserv)
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
outChan := make(chan interface{}, 8)
|
||||
res.SetOutput((<-chan interface{})(outChan))
|
||||
|
||||
fileAdder.Out = outChan
|
||||
fileAdder.Chunker = chunker
|
||||
fileAdder.Progress = progress
|
||||
|
Reference in New Issue
Block a user