kucservice 1.5.1 → 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 +18 -8
- package/dist/kucservice.common.js.gz +0 -0
- package/dist/kucservice.common.js.map +1 -1
- package/dist/kucservice.umd.js +18 -8
- 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,7 +2242,12 @@ 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.
|
|
2245
|
+
_this2.clearHeartCheck();
|
|
2246
|
+
|
|
2247
|
+
_this2.onopen = null;
|
|
2248
|
+
_this2.onclose = null;
|
|
2249
|
+
_this2.onerror = null;
|
|
2250
|
+
_this2.onmessage = null;
|
|
2246
2251
|
|
|
2247
2252
|
_this2._dep.notify('reconnect', _socket);
|
|
2248
2253
|
}, TIMEOUT);
|
|
@@ -2250,6 +2255,12 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2250
2255
|
// return console.error('WebSocket重连失败, 请联系技术客服!')
|
|
2251
2256
|
// }
|
|
2252
2257
|
|
|
2258
|
+
} else {
|
|
2259
|
+
this.clearHeartCheck();
|
|
2260
|
+
this.onopen = null;
|
|
2261
|
+
this.onclose = null;
|
|
2262
|
+
this.onerror = null;
|
|
2263
|
+
this.onmessage = null;
|
|
2253
2264
|
}
|
|
2254
2265
|
};
|
|
2255
2266
|
|
|
@@ -2312,11 +2323,11 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2312
2323
|
key: "closeSocket",
|
|
2313
2324
|
value: function closeSocket(code, reason) {
|
|
2314
2325
|
this.clearHeartCheck();
|
|
2315
|
-
console.log('=====close code===', code, reason);
|
|
2316
|
-
this.
|
|
2317
|
-
this.
|
|
2318
|
-
this.
|
|
2319
|
-
|
|
2326
|
+
console.log('=====close code===', code, reason); // this.onopen = null
|
|
2327
|
+
// this.onclose = null
|
|
2328
|
+
// this.onerror = null
|
|
2329
|
+
// this.onmessage = null
|
|
2330
|
+
|
|
2320
2331
|
this.close(code || 1000, reason);
|
|
2321
2332
|
} // 开始心跳检测
|
|
2322
2333
|
|
|
@@ -11620,8 +11631,7 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11620
11631
|
_classPrivateFieldSet(this, _player, null);
|
|
11621
11632
|
|
|
11622
11633
|
this.socketTimer && clearTimeout(this.socketTimer);
|
|
11623
|
-
(_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接');
|
|
11624
|
-
this.socket = null;
|
|
11634
|
+
(_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接'); // this.socket = null
|
|
11625
11635
|
|
|
11626
11636
|
if (_classPrivateFieldGet(this, _phoneClientObj)) {
|
|
11627
11637
|
_classPrivateFieldGet(this, _phoneClientObj).onclose();
|
|
Binary file
|