]> git.r.bdr.sh - rbdr/junction/blobdiff - extension/peers.js
Ensure connections are closed
[rbdr/junction] / extension / peers.js
index fced1085277c85649c6f551fbc84ecba440af091..5ba5c487b20533ba1c0cbb3f76e5c1056c2fe793 100644 (file)
@@ -98,6 +98,9 @@ export function countPeers() {
 }
 
 export function resetPeers() {
+  for (const connection of Object.values(internals.peers)) {
+    connection.close();
+  }
   internals.peers = {};
   document
     .querySelectorAll(".junction-call-audio")