summaryrefslogtreecommitdiff
path: root/addons/bus
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-04-09 14:35:36 +0000
committerSébastien Theys <seb@odoo.com>2020-04-09 17:03:09 +0000
commitb59a77844e8b6e5f9501a0989872f75d3ab0b862 (patch)
tree2f2f933d0dcc5d94f3c9668c40db2cde5e982041 /addons/bus
parent66a4d8f94c827643b11c160685df254c553bfe94 (diff)
[FIX] bus: restart poll just after abort
Fix regression introduced with e0ed7b12ca2c355fd1c47566273b7f690b324798 Issue without current commit: When doing `abort` next updates from the bus are only received after the normal timeout, which makes the interface unresponsive to updates during that amount of time. `abort` is for example called during `addChannel`, where it is specifically documented that new updates are to be received immediately. closes odoo/odoo#49355 X-original-commit: 888610e5e07794e000ef27edcb075cb45c1e2ccc Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/bus')
-rw-r--r--addons/bus/static/src/js/longpolling_bus.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/bus/static/src/js/longpolling_bus.js b/addons/bus/static/src/js/longpolling_bus.js
index a919e3ab921..9c8df877c9a 100644
--- a/addons/bus/static/src/js/longpolling_bus.js
+++ b/addons/bus/static/src/js/longpolling_bus.js
@@ -191,7 +191,7 @@ var LongpollingBus = Bus.extend(ServicesMixin, {
self._pollRpc = false;
// no error popup if request is interrupted or fails for any reason
result.event.preventDefault();
- if (result.message && result.message.message === "XmlHttpRequestError abort") {
+ if (result.message === "XmlHttpRequestError abort") {
self._poll();
} else {
// random delay to avoid massive longpolling