mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
do not crash if cookiefile invalid
This commit is contained in:
parent
a3ea94c771
commit
efcda9a45e
@ -11,10 +11,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.2" />
|
||||
<PackageReference Include="NBitcoin" Version="4.0.0.34" />
|
||||
<PackageReference Include="NBitcoin" Version="4.0.0.38" />
|
||||
<PackageReference Include="NBitpayClient" Version="1.0.0.6" />
|
||||
<PackageReference Include="DBreeze" Version="1.87.0" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.7" />
|
||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.9" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
||||
<PackageReference Include="System.Xml.XmlSerializer" Version="4.0.11" />
|
||||
</ItemGroup>
|
||||
|
@ -34,8 +34,11 @@ namespace BTCPayServer.Configuration
|
||||
{
|
||||
Network = opts.Network;
|
||||
Explorer = new ExplorerClient(opts.Network, opts.Explorer);
|
||||
Explorer.SetCookieFile(opts.CookieFile);
|
||||
CancellationTokenSource cts = new CancellationTokenSource(5000);
|
||||
|
||||
if(!Explorer.SetCookieAuth(opts.CookieFile))
|
||||
Explorer.SetNoAuth();
|
||||
|
||||
CancellationTokenSource cts = new CancellationTokenSource(10000);
|
||||
try
|
||||
{
|
||||
Logs.Configuration.LogInformation("Trying to connect to explorer " + Explorer.Address.AbsoluteUri);
|
||||
@ -84,7 +87,7 @@ namespace BTCPayServer.Configuration
|
||||
_Resources.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Network Network
|
||||
{
|
||||
get;
|
||||
|
Loading…
Reference in New Issue
Block a user