mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Merge pull request #5632 from SimonBrandner/handle-undefined-peerconn
Handle undefined call stats
This commit is contained in:
commit
4aacc2a073
1 changed files with 7 additions and 0 deletions
|
@ -427,6 +427,13 @@ export default class CallHandler {
|
||||||
`our Party ID: ${call.ourPartyId}, hangup party: ${call.hangupParty}, ` +
|
`our Party ID: ${call.ourPartyId}, hangup party: ${call.hangupParty}, ` +
|
||||||
`hangup reason: ${call.hangupReason}`,
|
`hangup reason: ${call.hangupReason}`,
|
||||||
);
|
);
|
||||||
|
if (!stats) {
|
||||||
|
logger.debug(
|
||||||
|
"Call statistics are undefined. The call has " +
|
||||||
|
"probably failed before a peerConn was established",
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
logger.debug("Local candidates:");
|
logger.debug("Local candidates:");
|
||||||
for (const cand of stats.filter(item => item.type === 'local-candidate')) {
|
for (const cand of stats.filter(item => item.type === 'local-candidate')) {
|
||||||
const address = cand.address || cand.ip; // firefox uses 'address', chrome uses 'ip'
|
const address = cand.address || cand.ip; // firefox uses 'address', chrome uses 'ip'
|
||||||
|
|
Loading…
Reference in a new issue