Avoid sending stats for ended calls
This commit is contained in:
parent
793a7b7b8f
commit
656ef334eb
1 changed files with 5 additions and 4 deletions
|
@ -593,6 +593,11 @@ export class ConferenceCallManager extends EventEmitter {
|
|||
let statsTimeout;
|
||||
|
||||
const sendStats = () => {
|
||||
if (call.state === "ended") {
|
||||
clearTimeout(statsTimeout);
|
||||
return;
|
||||
}
|
||||
|
||||
sendWebRTCInfoEvent("stats");
|
||||
statsTimeout = setTimeout(sendStats, 30 * 1000);
|
||||
};
|
||||
|
@ -626,10 +631,6 @@ export class ConferenceCallManager extends EventEmitter {
|
|||
);
|
||||
peerConnection.addEventListener("signalingstatechange", () => {
|
||||
sendWebRTCInfoEvent("signalingstatechange");
|
||||
|
||||
if (peerConnection.signalingState === "closed") {
|
||||
clearTimeout(statsTimeout);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue