title: Polly decorated httpclient does not seem to perform retries
body: <p>I am trying to get started with Polly.  Please see my Startup class below:</p>
  <pre><code>public class Startup
  {
      public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
      }
  
      public IConfiguration Configuration { get; }
  
      public void ConfigureServices(IServiceCollection services)
      {
          services//.AddCustomMvc(Configuration)
               //.AddCustomAuthentication(Configuration)
               .AddHttpServices()
               .AddHttpClientServices(Configuration)
          .AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
      }
  
      public void Configure(IApplicationBuilder app, IHostingEnvironment env)
      {
          //This is not changed.
      }
  }
  
  static class ServiceCollectionExtensions
  {
      public static IServiceCollection AddHttpClientServices(this IServiceCollection services, IConfiguration configuration)
      {
          services.AddSingleton&lt;IHttpContextAccessor, HttpContextAccessor&gt;();
  
          //register delegating handlers
          services.AddTransient&lt;HttpClientAuthorizationDelegatingHandler&gt;();
          services.AddTransient&lt;HttpClientRequestIdDelegatingHandler&gt;();
          services.AddHttpClient(&quot;extendedhandlerlifetime&quot;).SetHandlerLifetime(TimeSpan.FromMinutes(5));
          services.AddHttpClient&lt;IValuesService, ValuesService&gt;()
                 .SetHandlerLifetime(TimeSpan.FromMinutes(5))  //Sample. Default lifetime is 2 minutes
                 .AddHttpMessageHandler&lt;HttpClientAuthorizationDelegatingHandler&gt;()
                 .AddPolicyHandler(GetRetryPolicy())
                 .AddPolicyHandler(GetCircuitBreakerPolicy());
  
          return services;
      }
  
      public static IServiceCollection AddHttpServices(this IServiceCollection services)
      {
          services.AddTransient&lt;HttpClientAuthorizationDelegatingHandler&gt;();
          services.AddSingleton&lt;IHttpContextAccessor, HttpContextAccessor&gt;();
          services.AddHttpClient&lt;IValuesService, ValuesService&gt;()
              .AddHttpMessageHandler&lt;HttpClientAuthorizationDelegatingHandler&gt;()
              .AddPolicyHandler(GetRetryPolicy())
              .AddPolicyHandler(GetCircuitBreakerPolicy());
          return services;
      }
  
   
      static IAsyncPolicy&lt;HttpResponseMessage&gt; GetRetryPolicy()
      {
          return HttpPolicyExtensions
            .HandleTransientHttpError()
            .OrResult(msg =&gt; msg.StatusCode == System.Net.HttpStatusCode.NotFound)
            .WaitAndRetryAsync(6, retryAttempt =&gt; TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)));
  
      }
  
      static IAsyncPolicy&lt;HttpResponseMessage&gt; GetCircuitBreakerPolicy()
      {
          return HttpPolicyExtensions
              .HandleTransientHttpError()
              .CircuitBreakerAsync(5, TimeSpan.FromSeconds(30));
      }
  }
  </code></pre>
  <p>I am using the <code>HttpClient</code> like this:</p>
  <pre><code>  public class ValuesService : IValuesService
          {
              private readonly HttpClient _apiClient;
      
              public ValuesService(HttpClient httpClient)
              {
                  _apiClient = httpClient;
      
              }
      
              public async Task&lt;string&gt; GetValue()
              {
                  var uri = API.Values.GetValues(&quot;http://localhost:55461/api&quot;);
                  //The line below throws a SocketException
                  var responseString = await _apiClient.GetStringAsync(uri);
      
                  return responseString;
              }
          }
  </code></pre>
  <p><code>GetValue()</code> attempts to access the Web API once and then fails.  Why does it not attempt to access the Web API multiple times as configured?</p>