Skip to content

Commit

Permalink
Throw exception if sleep interval is less than minimal polling time
Browse files Browse the repository at this point in the history
  • Loading branch information
boma96 committed Aug 12, 2024
1 parent 080e335 commit 83af43b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public int CalculateDelay(
int currentSleepInterval
)
{
if (baseSleepInterval < _recoveryValue)
throw new ArgumentException($"Sleep interval must be greater than or equal than {_recoveryValue}ms");

if (taskToWorkerList.Count > 0)
{
currentSleepInterval /= _backoffRatio;
Expand Down

0 comments on commit 83af43b

Please sign in to comment.