Skip to content

Commit

Permalink
Patching a message lock refresh attempt that throw a NullReferenceExc…
Browse files Browse the repository at this point in the history
…eption when the client is null... just returns the method now
  • Loading branch information
cdmdotnet committed Jan 17, 2024
1 parent b83b096 commit 633dfc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Framework/Azure/Cqrs.Azure.ServiceBus/AzureBusHelper.cs
Expand Up @@ -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.");
Expand Down

0 comments on commit 633dfc8

Please sign in to comment.