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.
@@ -2233,7 +2233,12 @@ 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();
2236
+ _this2.clearHeartCheck();
2237
+
2238
+ _this2.onopen = null;
2239
+ _this2.onclose = null;
2240
+ _this2.onerror = null;
2241
+ _this2.onmessage = null;
2237
2242
 
2238
2243
  _this2._dep.notify('reconnect', _socket);
2239
2244
  }, TIMEOUT);
@@ -2241,6 +2246,12 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
2241
2246
  // return console.error('WebSocket重连失败, 请联系技术客服!')
2242
2247
  // }
2243
2248
 
2249
+ } else {
2250
+ this.clearHeartCheck();
2251
+ this.onopen = null;
2252
+ this.onclose = null;
2253
+ this.onerror = null;
2254
+ this.onmessage = null;
2244
2255
  }
2245
2256
  };
2246
2257
 
@@ -2303,11 +2314,11 @@ var websocket_Socket = /*#__PURE__*/function (_WebSocket) {
2303
2314
  key: "closeSocket",
2304
2315
  value: function closeSocket(code, reason) {
2305
2316
  this.clearHeartCheck();
2306
- console.log('=====close code===', code, reason);
2307
- this.onopen = null;
2308
- this.onclose = null;
2309
- this.onerror = null;
2310
- this.onmessage = null;
2317
+ console.log('=====close code===', code, reason); // this.onopen = null
2318
+ // this.onclose = null
2319
+ // this.onerror = null
2320
+ // this.onmessage = null
2321
+
2311
2322
  this.close(code || 1000, reason);
2312
2323
  } // 开始心跳检测
2313
2324
 
@@ -11611,8 +11622,7 @@ var common_request_wsClass = /*#__PURE__*/function () {
11611
11622
  _classPrivateFieldSet(this, _player, null);
11612
11623
 
11613
11624
  this.socketTimer && clearTimeout(this.socketTimer);
11614
- (_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接');
11615
- this.socket = null;
11625
+ (_this$socket2 = this.socket) === null || _this$socket2 === void 0 ? void 0 : _this$socket2.closeSocket(1000, '通知关闭websocket连接'); // this.socket = null
11616
11626
 
11617
11627
  if (_classPrivateFieldGet(this, _phoneClientObj)) {
11618
11628
  _classPrivateFieldGet(this, _phoneClientObj).onclose();
Binary file