Skip to content
Snippets Groups Projects
Commit 4a3f04bc authored by Géry Debongnie's avatar Géry Debongnie
Browse files

[FIX] web: add exponential backoff strategy for lost connection

Before this commit, the web client had a naive strategy to handle lost
connections: it tried to poll the server every 2 seconds until a rpc
succeeds.

This works quite well from the perspective of the user, but may be a problem
from the perspective of the server.  If a server is down for a longish period,
then each users active tabs will then perform a request every 2 seconds. This
means that the server will be progressively hammered by many requests, which
will clutter the logs, and make it more difficult to gracefully recover.

With this commit, we simply exponentially increase the delay each time, and add
a little jitter to give a better distribution.

closes odoo/odoo#30136
parent 83f5dc8e
No related branches found
No related tags found
No related merge requests found
Loading
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