-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry network requests on transient errors #3478
Retry network requests on transient errors #3478
Conversation
Instead of defaulting to G_IO_ERROR_FAILED, use more specific codes when we can. These were copied from libostree.
Currently if flatpak is installing an extra data app such as Spotify and the server with the .deb file fails to complete the request, the installation fails with a message like "Connection terminated unexpectedly". This commit makes flatpak instead try 5 times to download a given URI if the error returned seems like a transient one (so not, for example, 404 not found). This is analogous to what was done in libostree in commit 938055392fd455027a69398c441b992ae521aa87, and we use some code from there.
Here's some evidence this works from when I unplugged the network mid-install:
Though I'm not sure why the progress says 100%. It's possible I misused |
Never mind, the progress bar seems broken for extra data downloads independently of these patches, based on the output of |
Even with this patch I sometimes have issues installing Spotify, but it seems like an issue on their side that they keep dropping connections over and over:
|
Like ostreedev/ostree#1594 but for Flatpak.