Commit f08a8a14 authored by Steven Allen's avatar Steven Allen

fix: don't hold the pin lock while updating pins

fixes https://github.com/ipfs/go-ipfs/issues/6885
parent 495dd3cb
......@@ -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