Add peerConnection state to stats event check

This commit is contained in:
Robert Long 2021-08-03 16:21:18 -07:00
parent 656ef334eb
commit 2a0e24abd3

View file

@ -593,7 +593,10 @@ export class ConferenceCallManager extends EventEmitter {
let statsTimeout;
const sendStats = () => {
if (call.state === "ended") {
if (
call.state === "ended" ||
peerConnection.connectionState === "closed"
) {
clearTimeout(statsTimeout);
return;
}