Skip to content

Commit

Permalink
Merge branch 'abuzuhri:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinvenclovas authored Jun 5, 2024
2 parents a415b42 + ad37a14 commit b5a5646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/FikaAmazonAPI/Services/RequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private void RestHeader()

cancellationToken.ThrowIfCancellationRequested();

AmazonCredential.UsagePlansTimings[rateLimitType].Delay();
await AmazonCredential.UsagePlansTimings[rateLimitType].Delay();
tryCount++;
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/FikaAmazonAPI/Utils/RateLimits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ internal void SetRateLimit(decimal rate)
Rate = rate;
}

internal void Delay()
internal Task Delay()
{
Task.Delay(GetRatePeriodMs()).Wait();
return Task.Delay(GetRatePeriodMs());
}
}
}

0 comments on commit b5a5646

Please sign in to comment.