26 .HandleResult<HttpResponseMessage>(r => r.StatusCode == HttpStatusCode.TooManyRequests)
27 .WaitAndRetryAsync(retryCount, attempt =>
29 var calculated = (int)Math.Floor(Math.Pow(2, attempt));
30 var backoff = calculated > maxBackoff.Seconds ? maxBackoff.Seconds : calculated;
31 return TimeSpan.FromSeconds(backoff);