From 3ec29e534d76d70d40ab4988c2a9dfa553f21a16 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 11 Apr 2020 18:03:18 +0200 Subject: [PATCH] Destroy useless peer connections --- assets/js/components/calls/window.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 4543fe57..5336fb7f 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -206,6 +206,10 @@ class CallWindow extends CustomEvents { if(this.mainPeer) this.mainPeer.destroy(); + + // Destroy peer connections + for(const el of this.peersEls) + el[1].destroy() if(propagate) this.emitEvent("close");