Skip to content

Commit

Permalink
Merge pull request #4562 from ipfs/fix/addr-pinlock
Browse files Browse the repository at this point in the history
fix defered unlock of pin lock in AddR
  • Loading branch information
whyrusleeping authored Jan 9, 2018
2 parents c1a488f + bf5fd74 commit a7d710e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/coreunix/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func AddWithContext(ctx context.Context, n *core.IpfsNode, r io.Reader) (string,

// AddR recursively adds files in |path|.
func AddR(n *core.IpfsNode, root string) (key string, err error) {
n.Blockstore.PinLock().Unlock()
defer n.Blockstore.PinLock().Unlock()

stat, err := os.Lstat(root)
if err != nil {
Expand Down

0 comments on commit a7d710e

Please sign in to comment.