tremble 3 years ago
parent
commit
db8ea579e4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/components/RTC/index.vue

+ 4 - 2
src/components/RTC/index.vue

@@ -53,8 +53,10 @@ const confirmDialog = async () => {
 
     }
 
-    socket.value.close();
-    store.commit("rtc/setSocket", null);
+    setTimeout(() => {
+      socket.value.close();
+      store.commit("rtc/setSocket", null);
+    }, 100);
   }
 
   store.commit("rtc/setIsJoined", false);