Add peerConnection state to stats event check
This commit is contained in:
parent
656ef334eb
commit
2a0e24abd3
1 changed files with 4 additions and 1 deletions
|
@ -593,7 +593,10 @@ export class ConferenceCallManager extends EventEmitter {
|
||||||
let statsTimeout;
|
let statsTimeout;
|
||||||
|
|
||||||
const sendStats = () => {
|
const sendStats = () => {
|
||||||
if (call.state === "ended") {
|
if (
|
||||||
|
call.state === "ended" ||
|
||||||
|
peerConnection.connectionState === "closed"
|
||||||
|
) {
|
||||||
clearTimeout(statsTimeout);
|
clearTimeout(statsTimeout);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue