Skip to content

Commit

Permalink
worker: use w.shutdownCtx
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Dec 15, 2023
1 parent d5b3749 commit 0810fe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/contract_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (w *worker) withContractLock(ctx context.Context, fcid types.FileContractID
return err
}
defer func() {
releaseCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
releaseCtx, cancel := context.WithTimeout(w.shutdownCtx, 10*time.Second)
_ = contractLock.Release(releaseCtx)
cancel()
}()
Expand Down

0 comments on commit 0810fe1

Please sign in to comment.