set 10 min as the lifetime for each HttpMessageHandler int the pool

This commit is contained in:
Cesar De la Torre Llorente 2018-05-26 23:45:37 +02:00
parent 104661d39d
commit 01a1d65308

View File

@ -173,6 +173,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
services.AddTransient<HttpClientAuthorizationDelegatingHandler>();
services.AddTransient<HttpClientRequestIdDelegatingHandler>();
//set 5 min as the lifetime for each HttpMessageHandler int the pool
services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(TimeSpan.FromMinutes(5));
//add http client services