From 752133b01cc7cb0a10a3b4e06d5d097b27c6a6e8 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 18 Feb 2018 20:37:42 +0900 Subject: [PATCH] fix bug --- BTCPayServer/HostedServices/InvoiceNotificationManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/HostedServices/InvoiceNotificationManager.cs b/BTCPayServer/HostedServices/InvoiceNotificationManager.cs index 084359964..83500089b 100644 --- a/BTCPayServer/HostedServices/InvoiceNotificationManager.cs +++ b/BTCPayServer/HostedServices/InvoiceNotificationManager.cs @@ -281,7 +281,9 @@ namespace BTCPayServer.HostedServices { lock (_SendingRequestsByInvoiceId) { - _SendingRequestsByInvoiceId.Remove(id); + _SendingRequestsByInvoiceId.TryGetValue(id, out var executing2); + if(executing2 == sending) + _SendingRequestsByInvoiceId.Remove(id); } }, TaskScheduler.Default); }