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 auto reconnection not working properly. #5204

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

sebaland
Copy link
Member

Issue #, if available:

Description of changes:

This PR addresses an issue introduced in the refactor made on #5185.
When a reconnection happens, neither the session nor the streams are recreated (i.e. the existing ones are reused), so the AWSIoTStreamThread should not close them when it gets cancelled because of a reconnection.

I've solved this issue by creating a new cancelAndDisconnect: method that can be invoked with the proper flag when creating a new thread, i.e. self.userDidIssueDisconnect. A reconnection then would keep all the streams open and continue to receive updates.

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.

@sebaland sebaland requested review from awsmobilesdk and a team as code owners February 16, 2024 19:45
Copy link
Member

@harsh62 harsh62 left a comment

Choose a reason for hiding this comment

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

LGTM

@sebaland sebaland merged commit 9cd7cbb into main Feb 16, 2024
67 checks passed
@sebaland sebaland deleted the ruisebas/fixing_iot_reconnect branch February 16, 2024 21:58
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