We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 423fd49 commit a0a23baCopy full SHA for a0a23ba
connection.js
@@ -129,14 +129,18 @@ module.exports = function (RED) {
129
}
130
131
const publishCb = () => {
132
- this.mqttClient.publish(
133
- `$aws/things/${this.credentials.thingId}/shadow/name/${deviceId}/update`,
134
- payload
135
- )
+ if (!this.isDisconnecting) {
+ this.mqttClient.publish(
+ `$aws/things/${this.credentials.thingId}/shadow/name/${deviceId}/update`,
+ payload
136
+ )
137
+ }
138
139
- if (!this.isDisconnecting) {
140
+ if (type === 'desired') {
141
this.rater.execute(`${deviceId}`, publishCb.bind(this))
142
+ } else {
143
+ publishCb()
144
145
146
0 commit comments