Commit b7eae36f authored by Kevin Atkinson's avatar Kevin Atkinson

adder: fix bug where errors from calls to NewAdder caused daemon to hang

License: MIT
Signed-off-by: default avatarKevin Atkinson <k@kevina.org>
parent e17a6dd8
......@@ -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
......
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