From 1be64082469b44982f851d7c09e35edca1b17c4d Mon Sep 17 00:00:00 2001 From: rockstardev Date: Thu, 20 Feb 2020 16:54:18 -0600 Subject: [PATCH] Adding logging to try and catch situations where invoice is not expired --- BTCPayServer/HostedServices/InvoiceWatcher.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/HostedServices/InvoiceWatcher.cs b/BTCPayServer/HostedServices/InvoiceWatcher.cs index fffc5453e..85e62f071 100644 --- a/BTCPayServer/HostedServices/InvoiceWatcher.cs +++ b/BTCPayServer/HostedServices/InvoiceWatcher.cs @@ -180,7 +180,11 @@ namespace BTCPayServer.HostedServices { if (invoiceId == null) throw new ArgumentNullException(nameof(invoiceId)); - _WatchRequests.Writer.TryWrite(invoiceId); + + if (!_WatchRequests.Writer.TryWrite(invoiceId)) + { + Logs.PayServer.LogWarning($"Failed to write invoice {invoiceId} into WatchRequests channel"); + } } private async Task Wait(string invoiceId)