From: Josh Steadmon Date: Fri, 02 Sep 2022 23:51:56 GMT Subject: Re: [PATCH 7/7] bundle-uri: fetch a list of bundles Message-ID: In-Reply-To: <7b45c06cc9e0294311d9f00d40eb1fa4f8f146f9.1661181174.git.gitgitgadget@gmail.com> On 2022.08.22 15:12, Derrick Stolee via GitGitGadget wrote: [snip] > +static int download_bundle_to_file(struct remote_bundle_info *bundle, void *data) > +{ > + struct bundle_list_context *ctx = data; > + > + if (ctx->mode == BUNDLE_MODE_ANY && ctx->count) > + return 0; > + > + ctx->count++; > + return fetch_bundle_uri_internal(ctx->r, bundle, ctx->depth + 1, ctx->list); > +} We should check whether fetch_bundle_uri_internal() actually succeeds before we increment ctx->count here. Otherwise, if we're in BUNDLE_MODE_ANY and the client gets unlucky that one of the servers hosting a bundle file is offline, it won't retry any of the other servers.