-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use token to correlate "requests" and "responses". (#210)
**Issue:** MQTT is not a request/response protocol. Messages for the Shadow service have a "client token" field to help users correlate "request" messages to "response" messages, but this sample script wasn't using the token field. This led to confusion when running Device Advisor tests which send several `shadow/update` "request" messages during setup. The sample was receiving the `shadow/update/accepted` "response" messages unexpectedly leading to crashes. **Changes:** Set token on all "request" messages. Ignore any "response" message with an unexpected token.
- Loading branch information
Showing
1 changed file
with
87 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters