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 crash on topic listener callback and ack listener callback #4783

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

fingerplay
Copy link

Issue #, if available:
pre version will crash when self.ackCallbackDictionary call setObject:forKey and objectForKey: methods on different thread , this crash also happens on similar situation for self.topicListeners
Description of changes:
add serial queues for accessing self.ackCallbackDictionary and self.topicListeners, and use dispatch_sync for reading while dispatch_barrier_async for writing.
Check points:

  • Added new tests to cover change, if needed
  • All unit tests pass
  • All integration tests pass
  • Updated CHANGELOG.md
  • Documentation update for the change if required
  • PR title conforms to conventional commit style

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@fingerplay fingerplay requested review from a team and awsmobilesdk as code owners June 15, 2023 03:20
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.

None yet

2 participants