Skip to content

Commit 9ccab61

Browse files
committed
Use min
1 parent 664e51d commit 9ccab61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceControl.Infrastructure/AsyncTimer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public TimerJob(Func<CancellationToken, Task<TimerJobExecutionResult>> callback,
5151
catch (Exception ex)
5252
{
5353
consecutiveFailures++;
54-
var exponentialBackoffDelay = TimeSpan.FromSeconds(int.Max(60, consecutiveFailures * consecutiveFailures));
54+
var exponentialBackoffDelay = TimeSpan.FromSeconds(int.Min(60, consecutiveFailures * consecutiveFailures));
5555

5656
await Task.Delay(exponentialBackoffDelay, token).ConfigureAwait(false);
5757

0 commit comments

Comments
 (0)