diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index 522eacfb23..7ce3d52538 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -329,7 +329,11 @@ check_multi_info (OstreeFetcher *fetcher) } else { - g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, + /* When it is not a file, we want to retry the request. + * We accomplish that by using G_IO_ERROR_TIMED_OUT. + */ + int g_io_error_code = is_file ? G_IO_ERROR_FAILED : G_IO_ERROR_TIMED_OUT; + g_task_return_new_error (task, G_IO_ERROR, g_io_error_code, "While fetching %s: [%u] %s", eff_url, curlres, curl_easy_strerror (curlres)); _ostree_fetcher_journal_failure (req->fetcher->remote_name,