diff --git a/web/js/network/webrtc.js b/web/js/network/webrtc.js index b7575b90..fd69cba8 100755 --- a/web/js/network/webrtc.js +++ b/web/js/network/webrtc.js @@ -212,6 +212,13 @@ export const webrtc = { stream = null; } if (pc) { + pc.oniceconnectionstatechange = null; + pc.onicegatheringstatechange = null; + pc.onicecandidate = null; + pc.onicecandidateerror = null; + pc.onconnectionstatechange = null; + pc.ondatachannel = null; + pc.ontrack = null; pc.close(); pc = null; }