mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-20 19:19:06 +08:00
Repeat recurse/direct pin checks since they could have changed
License: MIT Signed-off-by: Michael Avila <me@michaelavila.com>
This commit is contained in:

committed by
Steven Allen

parent
254ac1b118
commit
7ed1a5361f
@ -236,6 +236,14 @@ func (p *pinner) Pin(ctx context.Context, node ipld.Node, recurse bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if p.recursePin.Has(c) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if p.directPin.Has(c) {
|
||||
p.directPin.Remove(c)
|
||||
}
|
||||
|
||||
p.recursePin.Add(c)
|
||||
} else {
|
||||
p.lock.Unlock()
|
||||
|
Reference in New Issue
Block a user