Commit b1e47218 authored by rht's avatar rht

Localize the scope of context.WithCancel for every DAG.Get

Instead put it inside of DAG.Get.
The fix is applied only in the case when the context.WithCancel
before a DAG.Get is also used later on in the scope.

License: MIT
Signed-off-by: default avatarrht <rhtbot@gmail.com>
parent 518bb43f
......@@ -106,8 +106,7 @@ func (p *pinner) Pin(ctx context.Context, node *mdag.Node, recurse bool) error {
p.recursePin.AddBlock(k)
} else {
_, err := p.dserv.Get(ctx, k)
if err != nil {
if _, err := p.dserv.Get(ctx, k); 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