From 8d613d4e57ef3a9df7c8b1d2c3658b23cf04aeb2 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 26 Jan 2019 16:03:15 +0100 Subject: [PATCH] Avoid stop loops --- assets/js/components/calls/callWindow.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/assets/js/components/calls/callWindow.js b/assets/js/components/calls/callWindow.js index 020aa9b4..51c7fca7 100644 --- a/assets/js/components/calls/callWindow.js +++ b/assets/js/components/calls/callWindow.js @@ -29,6 +29,11 @@ ComunicWeb.components.calls.callWindow = { */ open: true, + /** + * @type {Boolean} + */ + stopped: false, + window: {}, streams: {}, @@ -190,7 +195,13 @@ ComunicWeb.components.calls.callWindow = { //Make close button lives call.close = function(){ + + //Avoid to call this several times + if(call.stopped) + return; + call.open = false; + call.stopped = true; callContainer.remove(); //Close sockets connections too