Skip to content

Commit

Permalink
Fix retry count
Browse files Browse the repository at this point in the history
  • Loading branch information
chenriksson committed Feb 10, 2017
1 parent 3ba4234 commit 7f861cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/NuGetGallery/Services/PackageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ private async Task UpdateIsLatestInDatabaseAsync(List<UpdateIsLatestPackageEdit>
if (retryCount++ < UpdateIsLatestMaxRetries)
{
await Task.Delay(retryCount * 500);
await UpdateIsLatestAsync(packageRegistration);
await UpdateIsLatestAsync(packageRegistration, retryCount);
}
else
{
Expand Down Expand Up @@ -802,6 +802,11 @@ private async Task UpdateIsLatestInDatabaseAsync(List<UpdateIsLatestPackageEdit>
}

public Task UpdateIsLatestAsync(PackageRegistration packageRegistration)
{
return UpdateIsLatestAsync(packageRegistration, retryCount: 0);
}

private Task UpdateIsLatestAsync(PackageRegistration packageRegistration, int retryCount)
{
if (!packageRegistration.Packages.Any())
{
Expand Down

0 comments on commit 7f861cd

Please sign in to comment.