@zyzgroup/core-web 0.1.72 → 0.1.73
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/zyzgroup_core_web.iife.js +1 -1
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +4 -4
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +1 -1
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/WebSocketClient.d.ts.map +1 -1
|
@@ -21706,10 +21706,10 @@ class me {
|
|
|
21706
21706
|
const { code: e, reason: s, wasClean: r } = t;
|
|
21707
21707
|
oe(
|
|
21708
21708
|
`ws(${this.url}) onclose: code(${e}) reason(${s}) wasClean(${r})`
|
|
21709
|
-
), this.state = me.CLOSED, this.pingTimerID && (clearInterval(this.pingTimerID), this.pingTimerID = void 0), this.onclose?.(t), this.reconnect && this.reconnectAttempts < this.maxReconnectAttempts && (this.reconnectTimerID = setTimeout(
|
|
21709
|
+
), this.state = me.CLOSED, this.pingTimerID && (clearInterval(this.pingTimerID), this.pingTimerID = void 0), this.onclose?.(t), this.reconnect && this.reconnectAttempts < this.maxReconnectAttempts && (this.socket = void 0, this.reconnectTimerID = setTimeout(
|
|
21710
21710
|
this._connect.bind(this),
|
|
21711
21711
|
Fa(this.reconnectAttempts++)
|
|
21712
|
-
));
|
|
21712
|
+
), console.log(this.reconnectAttempts));
|
|
21713
21713
|
}, this.socket.onerror = (t) => {
|
|
21714
21714
|
oe(`ws(${this.url}) onerror: ${t.type} ${t}`), this.onerror?.(t);
|
|
21715
21715
|
}, this.socket.onmessage = (t) => {
|
|
@@ -21722,7 +21722,7 @@ class me {
|
|
|
21722
21722
|
type: "err",
|
|
21723
21723
|
failureType: s.toString(),
|
|
21724
21724
|
message: t.data
|
|
21725
|
-
}, Ke(
|
|
21725
|
+
}, Ke(`${Ue(e)}`);
|
|
21726
21726
|
}
|
|
21727
21727
|
if (e.body && Object.prototype.hasOwnProperty.call(e.body, "requestid")) {
|
|
21728
21728
|
const s = this.waitings[e.body.requestid];
|
|
@@ -21755,7 +21755,7 @@ class me {
|
|
|
21755
21755
|
}
|
|
21756
21756
|
// 可能需要根据协议变更传输格式
|
|
21757
21757
|
_send(t) {
|
|
21758
|
-
this.socket
|
|
21758
|
+
this.socket && this.socket.readyState === me.OPEN ? this.socket.send(JSON.stringify(t)) : (this.messageQueue.push(t), this._connect());
|
|
21759
21759
|
}
|
|
21760
21760
|
ping() {
|
|
21761
21761
|
this._send({ type: "ping" });
|