diff --git a/src/NuGetGallery/Services/PackageService.cs b/src/NuGetGallery/Services/PackageService.cs index d54a8dbaf8..b9d43756a2 100644 --- a/src/NuGetGallery/Services/PackageService.cs +++ b/src/NuGetGallery/Services/PackageService.cs @@ -772,7 +772,7 @@ private async Task UpdateIsLatestInDatabaseAsync(List if (retryCount++ < UpdateIsLatestMaxRetries) { await Task.Delay(retryCount * 500); - await UpdateIsLatestAsync(packageRegistration); + await UpdateIsLatestAsync(packageRegistration, retryCount); } else { @@ -802,6 +802,11 @@ private async Task UpdateIsLatestInDatabaseAsync(List } public Task UpdateIsLatestAsync(PackageRegistration packageRegistration) + { + return UpdateIsLatestAsync(packageRegistration, retryCount: 0); + } + + private Task UpdateIsLatestAsync(PackageRegistration packageRegistration, int retryCount) { if (!packageRegistration.Packages.Any()) {