diff --git a/BTCPayServer/ExplorerClientProvider.cs b/BTCPayServer/ExplorerClientProvider.cs index 44614243b..f5836c50b 100644 --- a/BTCPayServer/ExplorerClientProvider.cs +++ b/BTCPayServer/ExplorerClientProvider.cs @@ -33,7 +33,7 @@ namespace BTCPayServer Logs.Configuration.LogInformation($"{setting.CryptoCode}: Cookie file is {(setting.CookieFile ?? "not set")}"); if (setting.ExplorerUri != null) { - _Clients.TryAdd(setting.CryptoCode, CreateExplorerClient(httpClientFactory.CreateClient($"NBXPLORER_{setting.CryptoCode}"), _NetworkProviders.GetNetwork(setting.CryptoCode), setting.ExplorerUri, setting.CookieFile)); + _Clients.TryAdd(setting.CryptoCode, CreateExplorerClient(httpClientFactory.CreateClient(nameof(ExplorerClientProvider)), _NetworkProviders.GetNetwork(setting.CryptoCode), setting.ExplorerUri, setting.CookieFile)); } } } diff --git a/BTCPayServer/Hosting/BTCPayServerServices.cs b/BTCPayServer/Hosting/BTCPayServerServices.cs index 7cf22bc95..dd4967400 100644 --- a/BTCPayServer/Hosting/BTCPayServerServices.cs +++ b/BTCPayServer/Hosting/BTCPayServerServices.cs @@ -60,6 +60,10 @@ namespace BTCPayServer.Hosting o.UseOpenIddict, BTCPayOpenIdToken, string>(); }); services.AddHttpClient(); + services.AddHttpClient(nameof(ExplorerClientProvider), httpClient => + { + httpClient.Timeout = Timeout.InfiniteTimeSpan; + }); services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton();