Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check opt out status inside tracking queue to avoid race condition #664

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

jaredmixpanel
Copy link
Contributor

We set the opt out status from inside the tracking queue: https://github.com/mixpanel/mixpanel-swift/blob/master/Sources/MixpanelInstance.swift#L1507-L1534

But we were checking it outside of the queue, immediately upon calling track(), leading to cases where the check happens after opt out is queued up but before it has been processed.

See: #658 (comment)

@jaredmixpanel jaredmixpanel merged commit 05344af into master Feb 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant