Helpers async

This commit is contained in:
Praburaj 2015-04-15 23:35:47 -07:00
parent bea42ef0ca
commit 0083778faf
1 changed files with 4 additions and 4 deletions

View File

@ -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.
} }
} }