mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: Checked remoteConections size before find into it
When two connections close at the same time, it shows the following error : OpenVidu Error Remote connection unknown when 'onParticipantLeft'. Existing remote connections: [] it has been avoided checking if remoteConnections is not emptypull/609/head
parent
c0f1e1d6fb
commit
ce6beac85d
|
@ -731,6 +731,7 @@ export class Session extends EventDispatcher {
|
|||
*/
|
||||
onParticipantLeft(msg): void {
|
||||
|
||||
if(this.remoteConnections.size > 0) {
|
||||
this.getRemoteConnection(msg.connectionId).then(connection => {
|
||||
if (!!connection.stream) {
|
||||
const stream = connection.stream;
|
||||
|
@ -752,7 +753,7 @@ export class Session extends EventDispatcher {
|
|||
.catch(openViduError => {
|
||||
logger.error(openViduError);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue