Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[FIX] web: add exponential backoff strategy for lost connection #30136
Before this commit, the web client had a naive strategy to handle lost
This works quite well from the perspective of the user, but may be a problem
With this commit, we simply exponentially increase the delay each time, and add
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
Shouldn't a strategy like the Gmail one be more suitable?: it puts that there's a connection problem and retry in X seconds/minutes, with a button to retry now. With this, user is aware of the problem, and without interaction, it doesn't hammer the server, but you can interact for forcing the retry if needed.
@pedrobaeza Yes, it would be nice to do that, but it is actually not doable with a moderate amount of work. Currently whenever some code tries to perform a rpc and it is rejected, then the failure will cause everything depending on it to be stopped. I do not see how to generically restore them.
I suppose that gmail can do that because it has a more well defined job.
Note that this commit does not change the fact that there is still a notification displayed with the connection lost message, and the user is still free to refresh the browser.