mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-17 16:50:31 +00:00
Detach WebRTC handlers before close
This commit is contained in:
parent
8c890f0c8e
commit
637fd81452
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue