Browse Source

refactor(student): 注释掉自动重连的 WebSocket 逻辑

注释掉了 type 为 1 时自动创建 WebSocket 连接 2 的延迟执行代码,暂时禁用该自动重连逻辑
lsc 7 hours ago
parent
commit
c21c332544
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/views/Student/index.vue

+ 5 - 5
src/views/Student/index.vue

@@ -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('👉 连接断开,等待自动重连...')