Skip to content

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

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#696
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
@bmc08gt bmc08gt merged commit 12df3af into code/cash May 11, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/give-transactor-dispose-race branch May 11, 2026 19:16
@github-actions github-actions Bot added type: fix Bug fix area: network gRPC, connectivity, API, exchange rates labels May 11, 2026
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 type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant