Skip to content

fix(cash): race between give transactor dispose and start on quick bg/fg#695

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/give-transactor-dispose-race
May 11, 2026
Merged

fix(cash): race between give transactor dispose and start on quick bg/fg#695
bmc08gt merged 1 commit into
code/cashfrom
fix/give-transactor-dispose-race

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 11, 2026

When the user backgrounds and foregrounds quickly during an active give-bill flow, cancelAwaitForGrab() can dispose the transactor between with() and start(), nulling owner before start() reads it.

Fix by making the transactor self-protecting:

  • Reorder dispose() to cancel the scope before nulling fields
  • Check scope.isActive at the top of start() to bail out if disposed

Bugsnag: 6a021d748c3285d1a5987c43

When the user backgrounds and foregrounds quickly during an active
give-bill flow, cancelAwaitForGrab() can dispose the transactor
between with() and start(), nulling owner before start() reads it.

Fix by making the transactor self-protecting:
- Reorder dispose() to cancel the scope before nulling fields
- Check scope.isActive at the top of start() to bail out if disposed

Bugsnag: 6a021d748c3285d1a5987c43
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this May 11, 2026
@github-actions github-actions Bot added area: network gRPC, connectivity, API, exchange rates type: fix Bug fix labels May 11, 2026
@bmc08gt bmc08gt added the area: payments Payments, transfers, intents, billing label May 11, 2026
@bmc08gt bmc08gt merged commit e000a28 into code/cash May 11, 2026
2 of 3 checks passed
@bmc08gt bmc08gt deleted the fix/give-transactor-dispose-race branch May 11, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates area: payments Payments, transfers, intents, billing type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant