Skip to content

Commit

Permalink
guard for delay if diff is negative (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
acn-sbuad authored Nov 17, 2023
1 parent cabd774 commit a2feb5f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private async Task ConsumeOperation(string message)

int diff = (int)(_dateTime.UtcNow() - operationIdentifier.LastStatusCheck).TotalMilliseconds;

if (diff < _processingDelay)
if (diff > 0 && diff < _processingDelay)
{
await Task.Delay(_processingDelay - diff);
}
Expand Down

0 comments on commit a2feb5f

Please sign in to comment.