Fix manage webrtc room id
authorgparant <g.parant@thecodingmachine.com>
Fri, 8 May 2020 19:17:52 +0000 (21:17 +0200)
committergparant <g.parant@thecodingmachine.com>
Fri, 8 May 2020 19:17:52 +0000 (21:17 +0200)
back/src/Controller/IoSocketController.ts

index dad81e7caddc8b7414c1abd8b628b3226873b9bb..e055c143d06bcc0584eaaf74930f245e7d97f25a 100644 (file)
@@ -205,7 +205,11 @@ export class IoSocketController {
         }));
 
         //disconnect webrtc room
+        if(!Client.webRtcRoomId){
+            return;
+        }
         Client.leave(Client.webRtcRoomId);
+        delete Client.webRtcRoomId;
     }
 
     /**