Skip to content

Commit

Permalink
add HttpRequestException catch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Carpenter committed Mar 14, 2022
1 parent fa0a67e commit 98bbaf7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
{
response = await base.SendAsync(clonedRequest, cancellationToken);
}
catch (HttpRequestException)
{
//HDC request error, wait a bit and try again
Thread.Sleep(2000);
continue;
}
catch (SocketException)
{
//HDC timed out, wait a bit and try again
Expand Down

0 comments on commit 98bbaf7

Please sign in to comment.