Add peerConnection state to stats event check

This commit is contained in:
Robert Long committed 2021-08-03 16:21:18 -07:00
1 parent 656ef334eb
commit 2a0e24abd3
1 file changed
+4 -1
+4 -1
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;
}