* 模拟重连 * NOTICE: 仅用于开发环境
()
| 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 | * 断线重连后触发 |