private static bool HandleExceptionForHttpClient(Exception exception, int retries, int maxRetries)
{
var httpException = exception as HttpRequestException;
if (httpException != null)
{
if (httpException.InnerException is IOException
#if !CORECLR
|| httpException.InnerException is WebException
#endif
)
{
return HandleException(httpException.InnerException, retries, maxRetries);
}
else
return false;
}
else
return HandleException(exception, retries, maxRetries);
}