mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 05:12:51 +01:00
Server hanging in debug mode if altcoin node is unavailable (#6545)
This commit is contained in:
parent
e0a51537a1
commit
5a8c959b6b
@ -31,7 +31,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.5.2" />
|
||||
<PackageReference Include="NBitcoin" Version="7.0.46" />
|
||||
<PackageReference Include="NBitcoin" Version="7.0.48" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
|
||||
<PackageReference Include="NBitcoin" Version="7.0.46" />
|
||||
<PackageReference Include="NBitcoin" Version="7.0.48" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.5" />
|
||||
<PackageReference Include="DigitalRuby.ExchangeSharp" Version="1.2.0" />
|
||||
|
@ -33,7 +33,11 @@ namespace BTCPayServer.Services
|
||||
if (liquid is not null)
|
||||
{
|
||||
var lbtcrpc = GetCashCow(liquid.CryptoCode);
|
||||
await lbtcrpc.SendCommandAsync("rescanblockchain");
|
||||
try
|
||||
{
|
||||
await lbtcrpc.SendCommandAsync("rescanblockchain");
|
||||
}
|
||||
catch { goto next; }
|
||||
var elements = _prov.NetworkProviders.GetAll().OfType<Plugins.Altcoins.ElementsBTCPayNetwork>();
|
||||
foreach (Plugins.Altcoins.ElementsBTCPayNetwork element in elements)
|
||||
{
|
||||
@ -50,8 +54,12 @@ namespace BTCPayServer.Services
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await Task.WhenAll(_prov.GetAll().Select(o => o.Item2.RPCClient.ScanRPCCapabilitiesAsync()));
|
||||
next:
|
||||
try
|
||||
{
|
||||
await Task.WhenAll(_prov.GetAll().Select(o => o.Item2.RPCClient.ScanRPCCapabilitiesAsync()));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
Task IHostedService.StopAsync(CancellationToken cancellationToken)
|
||||
|
Loading…
Reference in New Issue
Block a user