Unverified Commit 92e4fe9a authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #2 from ipfs/fix/unlock-while-pinning

fix: don't hold the pin lock while updating pins
parents 495dd3cb f08a8a14
Pipeline #173 failed with stages
......@@ -526,7 +526,11 @@ func (p *pinner) Update(ctx context.Context, from, to cid.Cid, unpin bool) error
return fmt.Errorf("'from' cid was not recursively pinned already")
}
// Temporarily unlock while we fetch the differences.
p.lock.Unlock()
err := dagutils.DiffEnumerate(ctx, p.dserv, from, to)
p.lock.Lock()
if err != nil {
return err
}
......
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