localworker: Use better context for calling returnFunc

This commit is contained in:
Łukasz Magiera 2020-10-18 19:09:13 +02:00
parent 879aa9512d
commit dbb421c4f7

View File

@ -215,10 +215,12 @@ func (l *LocalWorker) asyncCall(ctx context.Context, sector abi.SectorID, rt Ret
go func() {
defer l.running.Done()
res, err := work(&wctx{
ctx := &wctx{
vals: ctx,
closing: l.closing,
}, ci)
}
res, err := work(ctx, ci)
{
rb, err := json.Marshal(res)