Skip to content

Fix race condition causing double MMR revert on match cancellation#106

Open
ershisan99 wants to merge 1 commit intomainfrom
claude/fix-mmr-cancellation-refund-GkaGQ
Open

Fix race condition causing double MMR revert on match cancellation#106
ershisan99 wants to merge 1 commit intomainfrom
claude/fix-mmr-cancellation-refund-GkaGQ

Conversation

@ershisan99
Copy link
Copy Markdown
Collaborator

The cancel path lacked the processingMatchEnds guard that the win
path already used, allowing concurrent cancel calls to double-revert
MMR. Also added early return in endMatch when a cancelled match is
already closed, and added returns after helper/log-channel cancel to
prevent fall-through into the vote path.

https://claude.ai/code/session_01FqCy7mK1fGVg3cR9Fcxpa2

The cancel path lacked the `processingMatchEnds` guard that the win
path already used, allowing concurrent cancel calls to double-revert
MMR. Also added early return in `endMatch` when a cancelled match is
already closed, and added returns after helper/log-channel cancel to
prevent fall-through into the vote path.

https://claude.ai/code/session_01FqCy7mK1fGVg3cR9Fcxpa2
@ershisan99
Copy link
Copy Markdown
Collaborator Author

Haven't checked the code yet, just had Claude do it from my phone, will double check tmrw

Copy link
Copy Markdown
Collaborator

@robotzurg robotzurg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me personally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants