gemercheung 3 jaren geleden
bovenliggende
commit
8e50a95fb1
1 gewijzigde bestanden met toevoegingen van 9 en 5 verwijderingen
  1. 9 5
      src/controller/room/index.js

+ 9 - 5
src/controller/room/index.js

@@ -195,11 +195,15 @@ export class RoomController extends BasicController {
       }
       }
     });
     });
     this.socket.on(EVENT.stopCall, () => {
     this.socket.on(EVENT.stopCall, () => {
-      this.roomAssistant.stopCall(this.roomId, this.userId, this.user);
-      if (this.isHoster(this.user.role)) {
-        // 以stopCall断开做为真正的退出房间
-        this.roomAssistant.destoryRoom(this.sessionId, this.roomConfigId);
-      }
+      setTimeout(() => {
+        console.log("EVENT.stopCall-delay");
+        this.roomAssistant.stopCall(this.roomId, this.userId, this.user);
+        if (this.isHoster(this.user.role)) {
+          // 以stopCall断开做为真正的退出房间
+          setTimeout(() => {});
+          this.roomAssistant.destoryRoom(this.sessionId, this.roomConfigId);
+        }
+      }, 1000);
     });
     });
 
 
     this.socket.on(EVENT.changeRoomEnableTalk, async (data) => {
     this.socket.on(EVENT.changeRoomEnableTalk, async (data) => {