@larksuiteoapi/node-sdk 1.48.0-alpha.2 → 1.48.0-alpha.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/es/index.js CHANGED
@@ -81547,7 +81547,11 @@ class WSClient {
81547
81547
  if (this.pingInterval) {
81548
81548
  clearTimeout(this.pingInterval);
81549
81549
  }
81550
+ const wsInstance = this.wsConfig.getWSInstance();
81550
81551
  if (isStart) {
81552
+ if (wsInstance) {
81553
+ wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.terminate();
81554
+ }
81551
81555
  const isSuccess = yield tryConnect();
81552
81556
  if (!isSuccess) {
81553
81557
  this.logger.error('[ws]', 'connect failed');
@@ -81556,7 +81560,6 @@ class WSClient {
81556
81560
  this.logger.info('[ws]', 'ws client ready');
81557
81561
  return;
81558
81562
  }
81559
- const wsInstance = this.wsConfig.getWSInstance();
81560
81563
  const { autoReconnect, reconnectNonce, reconnectCount, reconnectInterval } = this.wsConfig.getWS();
81561
81564
  if (!autoReconnect) {
81562
81565
  return;
package/lib/index.js CHANGED
@@ -81562,7 +81562,11 @@ class WSClient {
81562
81562
  if (this.pingInterval) {
81563
81563
  clearTimeout(this.pingInterval);
81564
81564
  }
81565
+ const wsInstance = this.wsConfig.getWSInstance();
81565
81566
  if (isStart) {
81567
+ if (wsInstance) {
81568
+ wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.terminate();
81569
+ }
81566
81570
  const isSuccess = yield tryConnect();
81567
81571
  if (!isSuccess) {
81568
81572
  this.logger.error('[ws]', 'connect failed');
@@ -81571,7 +81575,6 @@ class WSClient {
81571
81575
  this.logger.info('[ws]', 'ws client ready');
81572
81576
  return;
81573
81577
  }
81574
- const wsInstance = this.wsConfig.getWSInstance();
81575
81578
  const { autoReconnect, reconnectNonce, reconnectCount, reconnectInterval } = this.wsConfig.getWS();
81576
81579
  if (!autoReconnect) {
81577
81580
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larksuiteoapi/node-sdk",
3
- "version": "1.48.0-alpha.2",
3
+ "version": "1.48.0-alpha.3",
4
4
  "description": "larksuite open sdk for nodejs",
5
5
  "keywords": [
6
6
  "feishu",