kucservice 1.4.9 → 1.5.1
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 +9 -2
- package/dist/kucservice.common.js.gz +0 -0
- package/dist/kucservice.common.js.map +1 -1
- package/dist/kucservice.umd.js +9 -2
- 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
|
@@ -2233,6 +2233,8 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2233
2233
|
this.self.socketTimer = setTimeout(function () {
|
|
2234
2234
|
var _socket = new Socket(optionsClone, _this2._dep, _this2._reconnectCount, _this2.self);
|
|
2235
2235
|
|
|
2236
|
+
_this2.closeSocket();
|
|
2237
|
+
|
|
2236
2238
|
_this2._dep.notify('reconnect', _socket);
|
|
2237
2239
|
}, TIMEOUT);
|
|
2238
2240
|
} // } else {
|
|
@@ -2302,7 +2304,11 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
|
|
|
2302
2304
|
value: function closeSocket(code, reason) {
|
|
2303
2305
|
this.clearHeartCheck();
|
|
2304
2306
|
console.log('=====close code===', code, reason);
|
|
2305
|
-
this.
|
|
2307
|
+
this.onopen = null;
|
|
2308
|
+
this.onclose = null;
|
|
2309
|
+
this.onerror = null;
|
|
2310
|
+
this.onmessage = null;
|
|
2311
|
+
this.close(code || 1000, reason);
|
|
2306
2312
|
} // 开始心跳检测
|
|
2307
2313
|
|
|
2308
2314
|
}, {
|
|
@@ -11548,7 +11554,8 @@ var common_request_wsClass = /*#__PURE__*/function () {
|
|
|
11548
11554
|
_onError && _onError(e);
|
|
11549
11555
|
},
|
|
11550
11556
|
onReconnect: function onReconnect(e) {
|
|
11551
|
-
_this.
|
|
11557
|
+
_this.socket = null;
|
|
11558
|
+
_this.socket = e;
|
|
11552
11559
|
|
|
11553
11560
|
_this.initSocket({
|
|
11554
11561
|
onOpen: _onOpen,
|
|
Binary file
|