Skip to content

Commit

Permalink
[FIX] mail: prevent blocking datachannel access if one is unavailable
Browse files Browse the repository at this point in the history
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#76102

Signed-off-by: Sébastien Theys (seb) <[email protected]>
  • Loading branch information
ThanhDodeurOdoo committed Sep 7, 2021
1 parent 63ff23c commit 0051fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/mail/static/src/models/rtc/rtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0051fda

Please sign in to comment.