Helpers async
This commit is contained in:
parent
bea42ef0ca
commit
0083778faf
|
|
@ -43,7 +43,7 @@ namespace DeploymentHelpers
|
||||||
|
|
||||||
return response; //Went through successfully
|
return response; //Went through successfully
|
||||||
}
|
}
|
||||||
catch (AggregateException exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
if (retry == retryCount - 1)
|
if (retry == retryCount - 1)
|
||||||
{
|
{
|
||||||
|
|
@ -51,13 +51,13 @@ namespace DeploymentHelpers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (exception.InnerException is HttpRequestException
|
if (exception is HttpRequestException
|
||||||
#if DNX451
|
#if DNX451
|
||||||
|| exception.InnerException is System.Net.WebException
|
|| exception is System.Net.WebException
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
logger.LogWarning("Failed to complete the request : {0}.", exception.InnerException.Message);
|
logger.LogWarning("Failed to complete the request : {0}.", exception.Message);
|
||||||
Thread.Sleep(1 * 1000); //Wait for a while before retry.
|
Thread.Sleep(1 * 1000); //Wait for a while before retry.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue