Skip to content
Snippets Groups Projects
Commit 4614fdf7 authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] bus: prevent error popups when longpolling requests are interrupted

1b9c404e modified the /longpolling/poll requests
to use openerp.session.rpc() instead of openerp.jsonRpc().
In order to properly disable error popups, an
explicit preventDefault() call is now required.
parent 152c5c2b
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,8 @@
self.poll();
}
}, function(unused, e) {
// no error popup if request is interrupted or fails for any reason
e.preventDefault();
// random delay to avoid massive longpolling
setTimeout(_.bind(self.poll, self), bus.ERROR_DELAY + (Math.floor((Math.random()*20)+1)*1000));
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment