Skip to content

Commit

Permalink
fix: return max if exceeding max wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelldon committed Feb 7, 2022
1 parent 54f664a commit de7fbbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Client/ZeebeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ namespace Zeebe.Client
/// <inheritdoc />
public class ZeebeClient : IZeebeClient
{
private static readonly int MaxWaitTimeInSeconds = 60;
private static readonly Func<int, TimeSpan> DefaultWaitTimeProvider =
retryAttempt => TimeSpan.FromSeconds(Math.Max(Math.Pow(2, retryAttempt), MaxWaitTimeInSeconds));
internal static readonly int MaxWaitTimeInSeconds = 60;
internal static readonly Func<int, TimeSpan> DefaultWaitTimeProvider =
retryAttempt => TimeSpan.FromSeconds(Math.Min(Math.Pow(2, retryAttempt), MaxWaitTimeInSeconds));
private static readonly TimeSpan DefaultKeepAlive = TimeSpan.FromSeconds(30);

private readonly Channel channelToGateway;
Expand Down

0 comments on commit de7fbbf

Please sign in to comment.