@zyzgroup/core-web 0.1.83 → 0.1.84
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.
|
@@ -21699,9 +21699,9 @@ 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.
|
|
21702
|
+
oe(`ws(${this.url}) onopen`), this.state = me.OPEN, this.reconnectTimerID && (clearTimeout(this.reconnectTimerID), this.reconnectTimerID = void 0);
|
|
21703
21703
|
const t = this.messageQueue.slice();
|
|
21704
|
-
this.messageQueue = [], t.forEach(this._send.bind(this)), this.onopen?.();
|
|
21704
|
+
this.messageQueue = [], t.forEach(this._send.bind(this)), this.ping(), this.pingTimerID = setInterval(this.ping.bind(this), this.pingInterval), this.onopen?.();
|
|
21705
21705
|
}, this.socket.onclose = (t) => {
|
|
21706
21706
|
const { code: e, reason: s, wasClean: r } = t;
|
|
21707
21707
|
oe(
|
|
@@ -21711,7 +21711,7 @@ class me {
|
|
|
21711
21711
|
Fa(this.reconnectAttempts++)
|
|
21712
21712
|
));
|
|
21713
21713
|
}, this.socket.onerror = (t) => {
|
|
21714
|
-
oe(`ws(${this.url}) onerror: ${t
|
|
21714
|
+
oe(`ws(${this.url}) onerror: ${t}`), this.onerror?.(t);
|
|
21715
21715
|
}, this.socket.onmessage = (t) => {
|
|
21716
21716
|
if (oe(`ws(${this.url}) onmessage: { type: ${t.type}, data: ${t.data} }`), typeof t.data == "string") {
|
|
21717
21717
|
let e;
|