[FIX] discuss: prevent peer-to-peer update without a RTCPeerConnection
Before this commit, it was possible that an attempt to update peer connections made right at the moment the connection was swapped from peer-to-peer to server mode. Which would cause a traceback. This commit fixes this issue by checking if there is a `RTCPeerConnection` before trying to update it. closes odoo/odoo#148505 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -1494,6 +1494,9 @@ export class Rtc {
|
||||
* negotiationneeded -> offer -> answer -> ...
|
||||
*/
|
||||
async updateRemote(session, trackKind) {
|
||||
if (!session.peerConnection) {
|
||||
return;
|
||||
}
|
||||
this.log(session, `updating ${trackKind} transceiver`);
|
||||
let track;
|
||||
switch (trackKind) {
|
||||
|
||||
Reference in New Issue
Block a user