Avoid stop loops

This commit is contained in:
Pierre HUBERT 2019-01-26 16:03:15 +01:00
parent 5a067001e9
commit 8d613d4e57

View File

@ -29,6 +29,11 @@ ComunicWeb.components.calls.callWindow = {
*/ */
open: true, open: true,
/**
* @type {Boolean}
*/
stopped: false,
window: {}, window: {},
streams: {}, streams: {},
@ -190,7 +195,13 @@ ComunicWeb.components.calls.callWindow = {
//Make close button lives //Make close button lives
call.close = function(){ call.close = function(){
//Avoid to call this several times
if(call.stopped)
return;
call.open = false; call.open = false;
call.stopped = true;
callContainer.remove(); callContainer.remove();
//Close sockets connections too //Close sockets connections too