AddWithContext wraps custom context

AddWithContext should use the custom context when calling
NewAdder

License: MIT
Signed-off-by: ForrestWeston <forrest@protocol.ai>
This commit is contained in:
ForrestWeston 2017-11-28 10:00:47 -08:00
parent 96b87238fe
commit 96e1315cff

View File

@ -307,7 +307,7 @@ func Add(n *core.IpfsNode, r io.Reader) (string, error) {
func AddWithContext(ctx context.Context, n *core.IpfsNode, r io.Reader) (string, error) {
defer n.Blockstore.PinLock().Unlock()
fileAdder, err := NewAdder(n.Context(), n.Pinning, n.Blockstore, n.DAG)
fileAdder, err := NewAdder(ctx, n.Pinning, n.Blockstore, n.DAG)
if err != nil {
return "", err
}