diff --git a/src/NzbDrone.Common/Composition/Container.cs b/src/NzbDrone.Common/Composition/Container.cs index a52ad0dc7..55a56bee2 100644 --- a/src/NzbDrone.Common/Composition/Container.cs +++ b/src/NzbDrone.Common/Composition/Container.cs @@ -54,6 +54,7 @@ namespace NzbDrone.Common.Composition var factory = CreateSingletonImplementationFactory(implementation); _container.Register(service, factory); + _container.Register(service, factory, implementation.FullName); } public IEnumerable ResolveAll() where T : class diff --git a/src/NzbDrone.Common/Http/HttpClient.cs b/src/NzbDrone.Common/Http/HttpClient.cs index c05805af5..a757261da 100644 --- a/src/NzbDrone.Common/Http/HttpClient.cs +++ b/src/NzbDrone.Common/Http/HttpClient.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; using System.Net; using NLog; using NzbDrone.Common.Cache; @@ -28,13 +29,13 @@ namespace NzbDrone.Common.Http private readonly IRateLimitService _rateLimitService; private readonly ICached _cookieContainerCache; private readonly ICached _curlTLSFallbackCache; - private readonly IEnumerable _requestInterceptors; + private readonly List _requestInterceptors; public HttpClient(IEnumerable requestInterceptors, ICacheManager cacheManager, IRateLimitService rateLimitService, Logger logger) { _logger = logger; _rateLimitService = rateLimitService; - _requestInterceptors = requestInterceptors; + _requestInterceptors = requestInterceptors.ToList(); ServicePointManager.DefaultConnectionLimit = 12; _cookieContainerCache = cacheManager.GetCache(typeof(HttpClient));