注释掉了 type 为 1 时自动创建 WebSocket 连接 2 的延迟执行代码,暂时禁用该自动重连逻辑
@@ -4506,11 +4506,11 @@ const createWebSocketConnection = async (type = 1) => {
if (docSocket.value) {
initializeYjsData()
}
- if (type == 1) {
- setTimeout(() => {
- createWebSocketConnection(2)
- }, 1000)
- }
+ // if (type == 1) {
+ // setTimeout(() => {
+ // createWebSocketConnection(2)
+ // }, 1000)
+ // }
else if (event.status === 'disconnected') {
console.log('👉 连接断开,等待自动重连...')