MCPcopy Create free account
hub / github.com/msgbyte/tailchat / mockReconnect

Method mockReconnect

client/shared/api/socket.ts:94–105  ·  view source on GitHub ↗

* 模拟重连 * NOTICE: 仅用于开发环境

()

Source from the content-addressed store, hash-verified

92 * NOTICE: 仅用于开发环境
93 */
94 mockReconnect() {
95 this.socket.disconnect();
96 showToasts('reconnect after 5s');
97 setTimeout(() => {
98 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
99 // @ts-ignore
100 this.socket.io.skipReconnect = false;
101 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
102 // @ts-ignore
103 this.socket.io.reconnect();
104 }, 5 * 1000);
105 }
106
107 /**
108 * 断线重连后触发

Callers 1

Debug.tsxFile · 0.80

Calls 1

disconnectMethod · 0.45

Tested by

no test coverage detected