diff --git a/src/lock.ts b/src/lock.ts index 6613052..4535510 100644 --- a/src/lock.ts +++ b/src/lock.ts @@ -130,7 +130,7 @@ export class Lock implements AsyncDisposable { return false; } - const script = ` + const script = `#!lua flags=allow-key-locking -- Check if the current UUID still holds the lock if redis.call("get", KEYS[1]) == ARGV[1] then return redis.call("del", KEYS[1]) @@ -156,7 +156,7 @@ export class Lock implements AsyncDisposable { return false; } - const script = ` + const script = `#!lua flags=allow-key-locking -- Check if the current UUID still holds the lock if redis.call("get", KEYS[1]) ~= ARGV[1] then return 0