From 693c771111eb7fa6edaaa36bb86f3df64cc6b9ba Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 25 Apr 2018 12:25:45 +0200 Subject: [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. --- addons/web/static/src/js/core/session.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/core/session.js') 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)) { -- cgit v1.2.3