Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
rmandvikar committed Sep 23, 2023
1 parent 73b0cd6 commit 6a7a0fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ private static bool IsRetryAfterValid(
var statusCode = (int)response.StatusCode;
var isRetryAfterPresent = response.Headers.TryGetValue(ResponseHeaders.RetryAfter, out var retryAfterValue)
&& retryAfterValue != null;

Console.WriteLine($"retryAfterValue: {retryAfterValue}");

TimeSpan retryAfter;
var isRetryAfterValid =
// retry on 503 if retry-after not present as typical
Expand All @@ -138,6 +141,9 @@ private static bool IsRetryAfterValid(
// only retry if delay is at or above retry-after value
&& retryAfter <= sleepDurationWithJitter);

Console.WriteLine($"sleepDurationWithJitter: {sleepDurationWithJitter}");
Console.WriteLine($"isRetryAfterValid: {isRetryAfterValid}");

return isRetryAfterValid;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public async Task Showcase_Retries_With_RetryAfter_Delay_Header(int statusCode)
new RetrySettings
{
RetryCount = 5,
RetryDelayInMilliseconds = 1000,
RetryDelayInMilliseconds = 500,
});

using var invoker = HttpMessageInvokerFactory.Create(
Expand Down

0 comments on commit 6a7a0fd

Please sign in to comment.