@zyzgroup/core-web 0.1.73 → 0.1.75

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.
@@ -21688,7 +21688,7 @@ class me {
21688
21688
  this.url = t, this.socketCreatorProtocols = e?.socketCreatorProtocols, this.socketCreatorOptions = e?.socketCreatorOptions || {}, this.socketCreator = e?.socketCreator || s0, this.pingInterval = e?.pingInterval || 5e3, this.onopen = e?.onopen, this.onclose = e?.onclose, this.onerror = e?.onerror, this.reconnect = typeof e?.reconnect == "boolean" ? e.reconnect : !0, this.maxReconnectAttempts = typeof e?.maxReconnectAttempts == "number" ? e.maxReconnectAttempts : 1 / 0, this._connect();
21689
21689
  }
21690
21690
  open() {
21691
- this._connect();
21691
+ this.reconnectAttempts = 0, this._connect();
21692
21692
  }
21693
21693
  close() {
21694
21694
  this.state = me.CLOSING, this.socket?.close();
@@ -21699,7 +21699,7 @@ class me {
21699
21699
  this.socketCreatorProtocols,
21700
21700
  this.socketCreatorOptions
21701
21701
  ), this.socket.onopen = () => {
21702
- oe(`ws(${this.url}) onopen`), this.state = me.OPEN, this.ping(), this.pingTimerID = setInterval(this.ping.bind(this), this.pingInterval), this.reconnectTimerID && (clearTimeout(this.reconnectTimerID), this.reconnectTimerID = void 0, this.reconnectAttempts = 0);
21702
+ oe(`ws(${this.url}) onopen`), this.state = me.OPEN, this.ping(), this.pingTimerID = setInterval(this.ping.bind(this), this.pingInterval), this.reconnectTimerID && (clearTimeout(this.reconnectTimerID), this.reconnectTimerID = void 0);
21703
21703
  const t = this.messageQueue.slice();
21704
21704
  this.messageQueue = [], t.forEach(this._send), this.onopen?.();
21705
21705
  }, this.socket.onclose = (t) => {