[FIX] bus: restart poll just after abort

Fix regression introduced with e0ed7b12ca

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>
This commit is contained in:
Sébastien Theys
2020-04-09 17:03:09 +00:00
parent 66a4d8f94c
commit b59a77844e
+1 -1
View File
@@ -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