From 0051fda788ac87f2903ff5369eb85d42aee9aaa9 Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Tue, 7 Sep 2021 13:33:59 +0000 Subject: [PATCH] [FIX] mail: prevent blocking datachannel access if one is unavailable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, if one RTCDataChannel was not available, signaling using the RTDDataChannels was faulty. This commit fixes this issue by skipping unavailable dataChannels. closes odoo/odoo#76102 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/rtc/rtc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/rtc/rtc.js b/addons/mail/static/src/models/rtc/rtc.js index e37c9e7350c89..b754e05e12633 100644 --- a/addons/mail/static/src/models/rtc/rtc.js +++ b/addons/mail/static/src/models/rtc/rtc.js @@ -633,7 +633,7 @@ function factory(dependencies) { for (const token of targetTokens) { const dataChannel = this._dataChannels[token]; if (!dataChannel || dataChannel.readyState !== 'open') { - return; + continue; } dataChannel.send(content); }