take the pinlock when updating pins

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen 2018-10-02 14:36:12 -07:00
parent 5c8580d6ac
commit ab69f0fb4d

View File

@ -67,6 +67,8 @@ func (api *PinAPI) Update(ctx context.Context, from coreiface.Path, to coreiface
return err
}
defer api.node.Blockstore.PinLock().Unlock()
fp, err := api.core().ResolvePath(ctx, from)
if err != nil {
return err