take the pinlock when updating pins
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Oct 2, 2018 at 14:36 UTC
ab69f0fb4d85e7a133c87138953b3975bec20f8b
1 file changed
+2
core/coreapi/pin.go
+2
@@ -67,6 +67,8 @@ func (api *PinAPI) Update(ctx context.Context, from coreiface.Path, to coreiface
67
return err
68
}
69
70
+ defer api.node.Blockstore.PinLock().Unlock()
71
+
72
fp, err := api.core().ResolvePath(ctx, from)
73
if err != nil {
74
return err