Initial return value of connectToServerWithBackoffRetries in the tls_mutual_auth example is set incorrectly (CA-358) #242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The function
connectToServerWithBackoffRetriesin the filemqtt_demo_mutual_auth.chas its initial return status incorrectly set toEXIT_SUCCESS. In situations where the tls connection fails, the program continues as if it was successful, returningEXIT_SUCCESS. In order for the back off retries to function, this must be set toEXIT_FAILURE.Testing
Tested with esp-idf version
ESP-IDF v5.2.5-30-g41c2b799adI can see the example message on the aws IoT test client.
Without this change, turning off the wifi access point during the demo doesn't trigger the backoff retries when trying to connect. With this change, the increasing times between retries can be seen in the console.