Skip to content

Commit

Permalink
[release-v1.8] vsp: Hardcode background ctx
Browse files Browse the repository at this point in the history
The VSP client code was not handling contexts correctly. It was
receiving short-lived contexts bound to the lifespan of a single RPC
request, and using them to create feePayment instances. Most of the code
in feePayment executes async, so should be running on a long-lived
context such as context.Background().

Backport of 19f7ed1
  • Loading branch information
jholdstock committed Aug 8, 2023
1 parent 1c1bcfb commit 07854e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/vsp/feepayment.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (c *Client) feePayment(ctx context.Context, ticketHash *chainhash.Hash, pai

fp = &feePayment{
client: c,
ctx: ctx,
ctx: context.Background(),
ticketHash: *ticketHash,
policy: c.policy,
}
Expand Down

0 comments on commit 07854e3

Please sign in to comment.