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 timeout calculation in sendVector function to account for overflow #250

Merged
merged 7 commits into from
May 8, 2023

Conversation

AniruddhaKanhere
Copy link
Member

@AniruddhaKanhere AniruddhaKanhere commented May 3, 2023

Description

Currently, the MQTTContext.getTime() function returns a 32-bit value which represents the number of milliseconds elapsed since a given epoch. The code used a faulty comparison which did not account for overflow of the 32-bit value. This PR fixes that issue by using the predefined calculateElapsedTime function.

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

kstribrnAmzn
kstribrnAmzn previously approved these changes May 4, 2023
@AniruddhaKanhere AniruddhaKanhere merged commit b0acf49 into FreeRTOS:main May 8, 2023
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