From b59a77844e8b6e5f9501a0989872f75d3ab0b862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Thu, 9 Apr 2020 14:35:36 +0000 Subject: [PATCH] [FIX] bus: restart poll just after abort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- addons/bus/static/src/js/longpolling_bus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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