From 96e1315cff0fca083eec468a52ab5d981774e01e Mon Sep 17 00:00:00 2001 From: ForrestWeston Date: Tue, 28 Nov 2017 10:00:47 -0800 Subject: [PATCH] AddWithContext wraps custom context AddWithContext should use the custom context when calling NewAdder License: MIT Signed-off-by: ForrestWeston --- core/coreunix/add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/coreunix/add.go b/core/coreunix/add.go index abf914b64..fdc4ddaf4 100644 --- a/core/coreunix/add.go +++ b/core/coreunix/add.go @@ -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 }