mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
[Bug] If a altcoins is disabled from BTCPay and payout processor is used, it would crash at restart (#4997)
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
This commit is contained in:
parent
2c4349c630
commit
3d5361cd11
@ -136,7 +136,16 @@ public class PayoutProcessorService : EventHostedServiceBase
|
||||
if (matchedProcessor is not null)
|
||||
{
|
||||
await StopProcessor(data.Id, cancellationToken);
|
||||
var processor = await matchedProcessor.ConstructProcessor(data);
|
||||
IHostedService processor = null;
|
||||
try
|
||||
{
|
||||
processor = await matchedProcessor.ConstructProcessor(data);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Logs.PayServer.LogWarning(ex, $"Payout processor ({data.PaymentMethod}) failed to start. Skipping...");
|
||||
return;
|
||||
}
|
||||
await processor.StartAsync(cancellationToken);
|
||||
Services.TryAdd(data.Id, processor);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user