From 633dfc8de17cc776fb2b3d1b73f3b7d114f67ca6 Mon Sep 17 00:00:00 2001 From: Grover <135006+cdmdotnet@users.noreply.github.com> Date: Thu, 18 Jan 2024 09:24:01 +1300 Subject: [PATCH] Patching a message lock refresh attempt that throw a NullReferenceException when the client is null... just returns the method now --- Framework/Azure/Cqrs.Azure.ServiceBus/AzureBusHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/Azure/Cqrs.Azure.ServiceBus/AzureBusHelper.cs b/Framework/Azure/Cqrs.Azure.ServiceBus/AzureBusHelper.cs index e75626366..b09234d5f 100644 --- a/Framework/Azure/Cqrs.Azure.ServiceBus/AzureBusHelper.cs +++ b/Framework/Azure/Cqrs.Azure.ServiceBus/AzureBusHelper.cs @@ -312,7 +312,7 @@ await VerifySignatureAsync if (!ConfigurationManager.TryGetSetting($"{commandTypeName}.ShouldRefresh", out canRefresh)) canRefresh = false; - if (canRefresh) + if (canRefresh && serviceBusReceiver != null) { if (lockRefreshAction == null) Logger.LogWarning($"A command message arrived with the {messageId} was of type {commandTypeName} and was destined to support lock renewal, but no action was provided.");