diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-04-25 12:25:45 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-08-09 02:31:59 +0200 |
| commit | 693c771111eb7fa6edaaa36bb86f3df64cc6b9ba (patch) | |
| tree | 5925bfa18820a3545b6f8a3b189ed8647839e59e /addons/web/static/src/js/core/session.js | |
| parent | 23c0c791288bf132171eeeb43af54b8f12d5b880 (diff) | |
[IMP] web: abord the poll when destroy to avoid useless call
If the service bus are called and destroyed the rpc can be returned after, to
avoid a useless call to the database and unexpected behavior, we abort the
connection.
Diffstat (limited to 'addons/web/static/src/js/core/session.js')
| -rw-r--r-- | addons/web/static/src/js/core/session.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core/session.js b/addons/web/static/src/js/core/session.js index 09b65357404..fcbc5872be0 100644 --- a/addons/web/static/src/js/core/session.js +++ b/addons/web/static/src/js/core/session.js @@ -346,7 +346,9 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { return deferred.then(function () { if (aborted) { - return $.Deferred().reject('communication', $.Event(), 'abort', 'abort'); + var def = $.Deferred().reject('communication', $.Event(), 'abort', 'abort'); + def.abort = function () {}; + return def; } // TODO: remove if (! _.isString(url)) { |
