Fix issue on page reload

This commit is contained in:
Pierre HUBERT 2020-04-12 16:16:42 +02:00
parent 9deba36bcd
commit a1efa39654
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class CallsController {
* @param {Conversation} conv Information about the target conversation * @param {Conversation} conv Information about the target conversation
*/ */
static Open(conv) { static Open(conv) {
if(OpenConversations.has(conv.ID)) if(OpenConversations.has(conv.ID) && OpenConversations.get(conv.ID).rootEl.isConnected)
return; return;
console.info("Open call for conversation " + conv.ID); console.info("Open call for conversation " + conv.ID);

View File

@ -369,7 +369,7 @@ class CallWindow extends CustomEvents {
this.mainPeer.on("close", () => { this.mainPeer.on("close", () => {
console.log("Connection to main peer was closed.") console.log("Connection to main peer was closed.")
if(this.mainPeer) if(this.mainPeer)
this.Close(true); this.Close(false);
}); });
} }