Commit c53b7d39 authored by Steven Allen's avatar Steven Allen

fix(pin): wait till after fetching to remove direct pin

Otherwise, we could abort while fetching the graph and stay in a state where the
direct pin is removed.

fixes #4650
parent 550ed3b3
......@@ -225,9 +225,6 @@ func (p *pinner) Pin(ctx context.Context, node ipld.Node, recurse bool) error {
return nil
}
if p.directPin.Has(c) {
p.directPin.Remove(c)
}
p.lock.Unlock()
// fetch entire graph
err := mdag.FetchGraph(ctx, c, p.dserv)
......
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