From 97f883039e8b7136b9464ca8dcc44e3431cd3505 Mon Sep 17 00:00:00 2001 From: Stephen Crouch Date: Thu, 6 Mar 2025 12:08:00 +0100 Subject: [PATCH] Only release lock when watching subscriptions if it was actually acquired --- .../Subscriptions/WatchSubscriptionsStoredProcedure.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AppCoreNet.EventStore.SqlServer/Subscriptions/WatchSubscriptionsStoredProcedure.cs b/src/AppCoreNet.EventStore.SqlServer/Subscriptions/WatchSubscriptionsStoredProcedure.cs index c60a946..04acb5d 100644 --- a/src/AppCoreNet.EventStore.SqlServer/Subscriptions/WatchSubscriptionsStoredProcedure.cs +++ b/src/AppCoreNet.EventStore.SqlServer/Subscriptions/WatchSubscriptionsStoredProcedure.cs @@ -1,4 +1,4 @@ -// Licensed under the MIT license. +// Licensed under the MIT license. // Copyright (c) The AppCore .NET project. using System; @@ -97,9 +97,9 @@ IF @Id IS NULL IF @{nameof(Timeout)} <= 0 BREAK; END END - END - EXEC sp_releaseapplock @Resource = @{nameof(LockResource)} + EXEC sp_releaseapplock @Resource = @{nameof(LockResource)} + END SELECT @Id AS [{nameof(Model.WatchSubscriptionsResult.Id)}],