mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-07 08:04:29 +01:00
Fix: Invoice can't be paid in lightning anymore if lightning server sent error
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<Version>1.0.1.48</Version>
|
||||
<Version>1.0.1.49</Version>
|
||||
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -60,9 +60,6 @@ namespace BTCPayServer.Payments.Lightning
|
||||
|
||||
private async Task EnsureListening(string invoiceId, bool poll)
|
||||
{
|
||||
if (Listening(invoiceId))
|
||||
return;
|
||||
|
||||
var invoice = await _InvoiceRepository.GetInvoice(null, invoiceId);
|
||||
foreach (var paymentMethod in invoice.GetPaymentMethods(_NetworkProvider)
|
||||
.Where(c => c.GetId().PaymentType == PaymentTypes.LightningLike))
|
||||
@@ -98,7 +95,10 @@ namespace BTCPayServer.Payments.Lightning
|
||||
continue;
|
||||
}
|
||||
|
||||
StartListening(listenedInvoice);
|
||||
if (!Listening(invoiceId))
|
||||
{
|
||||
StartListening(listenedInvoice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,10 +232,7 @@ namespace BTCPayServer.Payments.Lightning
|
||||
_ListeningLightning.Add(listen);
|
||||
listen.ContinueWith(_ =>
|
||||
{
|
||||
lock (_ListenedInvoiceByLightningUrl)
|
||||
{
|
||||
_ListeningLightning.Remove(listen);
|
||||
}
|
||||
DoneListening(listenedInvoice);
|
||||
}, TaskScheduler.Default);
|
||||
}
|
||||
_ListenedInvoiceByLightningUrl.Add(listenedInvoice.Uri, listenedInvoice);
|
||||
|
||||
Reference in New Issue
Block a user