mm_os 2.2.2 → 2.2.3
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/index.js
CHANGED
|
@@ -138,11 +138,11 @@ MQTT.prototype.update_after = function() {
|
|
|
138
138
|
* 重新连接
|
|
139
139
|
*/
|
|
140
140
|
MQTT.prototype.reconnect = function() {
|
|
141
|
+
$.sleep(this.config.interval);
|
|
141
142
|
this.retryTimes += 1;
|
|
142
143
|
if (this.retryTimes > 5) {
|
|
143
144
|
try {
|
|
144
145
|
this.client.end();
|
|
145
|
-
$.sleep(this.config.interval);
|
|
146
146
|
this.init();
|
|
147
147
|
} catch (error) {
|
|
148
148
|
this.$message.error(error.toString());
|
|
@@ -193,7 +193,9 @@ MQTT.prototype.start = function() {
|
|
|
193
193
|
resolve(packet);
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
|
-
this.client.on("reconnect",
|
|
196
|
+
this.client.on("reconnect", () => {
|
|
197
|
+
this.reconnect();
|
|
198
|
+
});
|
|
197
199
|
this.client.on("error", (error) => {
|
|
198
200
|
console.error("Connection failed", error);
|
|
199
201
|
});
|
package/demo/config/local.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_os",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "这是超级美眉服务端框架,用于快速构建应用程序。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"koa-compress": "^5.1.1",
|
|
36
36
|
"koa-send": "^5.0.1",
|
|
37
37
|
"koa-websocket": "^7.0.0",
|
|
38
|
-
"mm_check": "^1.4.
|
|
38
|
+
"mm_check": "^1.4.8",
|
|
39
39
|
"mm_excel": "^1.2.0",
|
|
40
|
-
"mm_expand": "^1.7.
|
|
40
|
+
"mm_expand": "^1.7.2",
|
|
41
41
|
"mm_html": "^1.1.6",
|
|
42
42
|
"mm_koa_proxy": "^1.0.0",
|
|
43
43
|
"mm_logs": "^1.1.4",
|
|
44
|
-
"mm_machine": "^1.7.
|
|
44
|
+
"mm_machine": "^1.7.3",
|
|
45
45
|
"mm_mongodb": "^1.4.2",
|
|
46
46
|
"mm_mqtt": "^1.0.6",
|
|
47
47
|
"mm_mysql": "^1.8.0",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"mm_tpl": "^2.3.9",
|
|
53
53
|
"mm_xml": "^1.1.5",
|
|
54
54
|
"mosca": "^2.8.3",
|
|
55
|
-
"mqtt": "^5.10.
|
|
55
|
+
"mqtt": "^5.10.2",
|
|
56
|
+
"publish": "^0.6.0"
|
|
56
57
|
}
|
|
57
58
|
}
|