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

Fix race condition crash when getting goal connections #414

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

theospears
Copy link
Collaborator

There is a mutable map linking goals to health kit data sources. While all writes to
this were protected by a mutex, reads were not. It appears it is not safe to read from
this connection while writing to it, so this lead to crashes. Fix by also wrapping the
read.

Testing:
Launched the app and checked it could sync goals

@theospears
Copy link
Collaborator Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@theospears theospears merged commit a46e2c0 into master Oct 3, 2023
2 checks passed
@theospears theospears deleted the fix-goal-crash branch October 3, 2023 02:23
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.

1 participant