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(IoT): Fixing a potential race condition in the timer ring queue #5461

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ruisebas
Copy link
Member

@ruisebas ruisebas commented Nov 5, 2024

Issue #, if available:

Description of changes:
AWSMQTTSession.timerRing is a NSArray with each element being a NSSet. This can potentially cause a race condition that leads to a crash, if two different threads attempt to access/modify these collections at the same time.

I'm creating a new AWSMQTTTimerRing class that encapsulates these collections and protects their access with a NSLock, similar to what I previously did for AWSIoTAtomicDictionary

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.

@ruisebas ruisebas deployed to IntegrationTest November 5, 2024 16:32 — with GitHub Actions Active
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