[OTA] Add UserSelectable timeout for invitation to device #1445
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.
In our case the timeout is too small for the device to accept the invitation as it might be busy processing the loop. So the ability to specify timeout for the invitation is a nice to have feature for us.
And the second part of the pull request is to verify the last few responses from device to check for
OK
result as you can't guarantee the order of responses.We noticed several times that the result is coming after 2nd or 3rd response in the while loop. This will avoid wrong results - showing error even when the OTA update is successful.