Allow retries of SSL exceptions

This commit is contained in:
Ryan Brandenburg 2019-08-05 16:12:57 -07:00
parent 1b477405ca
commit 22df034ae6
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@ -175,6 +176,9 @@ namespace Templates.Test.SpaTemplateTest
catch (OperationCanceledException)
{
}
catch (HttpRequestException ex) when (ex.Message.StartsWith("The SSL connection could not be established"))
{
}
await Task.Delay(TimeSpan.FromSeconds(5 * attempt));
} while (attempt < maxAttempts);
}