Skip to content

Commit b0bc899

Browse files
committed
reuse local
1 parent a67c34b commit b0bc899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/CompareAndSwap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ if (await db.LockTakeAsync(lockKey, lockToken, lockExpiry))
178178
// Do work while holding the lock
179179
180180
// Extend the lock (uses CAS internally on Redis 8.4+)
181-
if (!(await db.LockExtendAsync(lockKey, lockToken, TimeSpan.FromSeconds(30)))
181+
if (!(await db.LockExtendAsync(lockKey, lockToken, lockExpiry))
182182
{
183183
// Failed to extend the lock - it expired, or was forcibly taken against our will
184184
throw new InvalidOperationException("Lock extension failed - check expiry duration is appropriate.");

0 commit comments

Comments
 (0)