[FIX] mail: fix typos (likely to fix webRTC recovery every 30sec in case of failure)

X-original-commit: 60eccab558d7a40cb4a27c7042f62f547e581ee6
Part-of: odoo/odoo#77107
This commit is contained in:
Alexandre Kühn
2021-09-23 20:18:42 +00:00
parent 07053cbfaa
commit b6d9bea33a
+3 -2
View File
@@ -76,8 +76,8 @@ function factory(dependencies) {
* This is distinct from this._recoverConnection which tries to restores
* connection that were established but failed or timed out.
*/
browser.setInterval(() => {
this.channel_id && this.currentRtcSession && this._callSessions();
this._intervalId = browser.setInterval(() => {
this.channel && this.currentRtcSession && this._callSessions();
}, 30000); // 30 seconds
}
@@ -88,6 +88,7 @@ function factory(dependencies) {
browser.removeEventListener('beforeunload', this._onBeforeUnload);
browser.removeEventListener('keydown', this._onKeyDown);
browser.removeEventListener('keyup', this._onKeyUp);
browser.clearInterval(this._intervalId);
return super._willDelete(...arguments);
}