From de7fbbf092916328e5198bd0fd4b4e9e4393ef8d Mon Sep 17 00:00:00 2001 From: Christopher Zell Date: Mon, 7 Feb 2022 21:22:38 +0100 Subject: [PATCH] fix: return max if exceeding max wait time --- Client/ZeebeClient.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/ZeebeClient.cs b/Client/ZeebeClient.cs index 7a3e157d..f4816d7f 100644 --- a/Client/ZeebeClient.cs +++ b/Client/ZeebeClient.cs @@ -33,9 +33,9 @@ namespace Zeebe.Client /// public class ZeebeClient : IZeebeClient { - private static readonly int MaxWaitTimeInSeconds = 60; - private static readonly Func DefaultWaitTimeProvider = - retryAttempt => TimeSpan.FromSeconds(Math.Max(Math.Pow(2, retryAttempt), MaxWaitTimeInSeconds)); + internal static readonly int MaxWaitTimeInSeconds = 60; + internal static readonly Func DefaultWaitTimeProvider = + retryAttempt => TimeSpan.FromSeconds(Math.Min(Math.Pow(2, retryAttempt), MaxWaitTimeInSeconds)); private static readonly TimeSpan DefaultKeepAlive = TimeSpan.FromSeconds(30); private readonly Channel channelToGateway;