mm_os 3.2.2 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/com/mqtt/drive.js +1 -1
- package/core/com/mqtt/index.js +3 -1
- package/package.json +1 -1
package/core/com/mqtt/drive.js
CHANGED
|
@@ -284,7 +284,7 @@ Drive.prototype.pushSync = function(clientid, msg, func, longtime = 0) {
|
|
|
284
284
|
}
|
|
285
285
|
setTimeout(async () => {
|
|
286
286
|
// 如果时间到了,回调函数还在队列中,则视为无回复
|
|
287
|
-
if (this.drives[clientid][key]) {
|
|
287
|
+
if (this.drives[clientid] && this.drives[clientid][key]) {
|
|
288
288
|
try {
|
|
289
289
|
await this.drives[clientid][key].func(null);
|
|
290
290
|
} catch (error) {
|
package/core/com/mqtt/index.js
CHANGED
|
@@ -262,7 +262,9 @@ MQTT.prototype.receive = async function(push_topic, msg) {
|
|
|
262
262
|
if (msg && (msg.indexOf('[') === 0) || msg.indexOf('{') === 0) {
|
|
263
263
|
try {
|
|
264
264
|
msg = JSON.parse(msg);
|
|
265
|
-
} catch {
|
|
265
|
+
} catch (error) {
|
|
266
|
+
$.log.error("消息结构体不对", error);
|
|
267
|
+
}
|
|
266
268
|
}
|
|
267
269
|
var ret;
|
|
268
270
|
var list = this.list;
|