Prevent infinity loop when joining listen only

This commit is contained in:
Oswaldo Acauan 2018-03-15 16:30:50 -03:00
parent bcaa8b2f6d
commit 5141b71d4f

View File

@ -118,7 +118,6 @@ class AudioManager {
}
joinListenOnly() {
console.log('entrei');
this.isListenOnly = true;
this.isEchoTest = false;
@ -141,7 +140,7 @@ class AudioManager {
]))
.catch((err) => {
// If theres a iceGathering timeout we retry to join after asking device permissions
if (err === iceGatheringErr) {
if (err === iceGatheringErr && !this.devicesInitialized) {
return this.askDevicesPermissions()
.then(() => this.joinListenOnly());
}