kucservice 1.5.0 → 1.5.2
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/dist/kucservice.common.js +21 -4
- package/dist/kucservice.common.js.gz +0 -0
- package/dist/kucservice.common.js.map +1 -1
- package/dist/kucservice.umd.js +21 -4
- package/dist/kucservice.umd.js.gz +0 -0
- package/dist/kucservice.umd.js.map +1 -1
- package/dist/kucservice.umd.min.js +1 -1
- package/dist/kucservice.umd.min.js.gz +0 -0
- package/dist/kucservice.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/kucservice.umd.js
CHANGED
|
@@ -2242,12 +2242,25 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2242
2242
|
this.self.socketTimer = setTimeout(function () {
|
|
2243
2243
|
var _socket = new Socket(optionsClone, _this2._dep, _this2._reconnectCount, _this2.self);
|
|
2244
2244
|
|
|
2245
|
+
_this2.clearHeartCheck();
|
|
2246
|
+
|
|
2247
|
+
_this2.onopen = null;
|
|
2248
|
+
_this2.onclose = null;
|
|
2249
|
+
_this2.onerror = null;
|
|
2250
|
+
_this2.onmessage = null;
|
|
2251
|
+
|
|
2245
2252
|
_this2._dep.notify('reconnect', _socket);
|
|
2246
2253
|
}, TIMEOUT);
|
|
2247
2254
|
} // } else {
|
|
2248
2255
|
// return console.error('WebSocket重连失败, 请联系技术客服!')
|
|
2249
2256
|
// }
|
|
2250
2257
|
|
|
2258
|
+
} else {
|
|
2259
|
+
this.clearHeartCheck();
|
|
2260
|
+
this.onopen = null;
|
|
2261
|
+
this.onclose = null;
|
|
2262
|
+
this.onerror = null;
|
|
2263
|
+
this.onmessage = null;
|
|
2251
2264
|
}
|
|
2252
2265
|
};
|
|
2253
2266
|
|
|
@@ -2310,8 +2323,12 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2310
2323
|
key: "closeSocket",
|
|
2311
2324
|
value: function closeSocket(code, reason) {
|
|
2312
2325
|
this.clearHeartCheck();
|
|
2313
|
-
console.log('=====close code===', code, reason);
|
|
2314
|
-
this.
|
|
2326
|
+
console.log('=====close code===', code, reason); // this.onopen = null
|
|
2327
|
+
// this.onclose = null
|
|
2328
|
+
// this.onerror = null
|
|
2329
|
+
// this.onmessage = null
|
|
2330
|
+
|
|
2331
|
+
this.close(code || 1000, reason);
|
|
2315
2332
|
} // 开始心跳检测
|
|
2316
2333
|
|
|
2317
2334
|
}, {
|
|
@@ -11557,6 +11574,7 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11557
11574
|
_onError && _onError(e);
|
|
11558
11575
|
},
|
|
11559
11576
|
onReconnect: function onReconnect(e) {
|
|
11577
|
+
_this.socket = null;
|
|
11560
11578
|
_this.socket = e;
|
|
11561
11579
|
|
|
11562
11580
|
_this.initSocket({
|
|
@@ -11613,8 +11631,7 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11613
11631
|
_classPrivateFieldSet(this, _player, null);
|
|
11614
11632
|
|
|
11615
11633
|
this.socketTimer && clearTimeout(this.socketTimer);
|
|
11616
|
-
(_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接');
|
|
11617
|
-
this.socket = null;
|
|
11634
|
+
(_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接'); // this.socket = null
|
|
11618
11635
|
|
|
11619
11636
|
if (_classPrivateFieldGet(this, _phoneClientObj)) {
|
|
11620
11637
|
_classPrivateFieldGet(this, _phoneClientObj).onclose();
|
|
Binary file
|