Skip to content

Commit 03f57c1

Browse files
committed
Fix off by one error
1 parent 7d201d8 commit 03f57c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal-packages/run-engine/src/engine/locking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class RunLocker {
216216
let lock: redlock.Lock | undefined;
217217
let lastError: Error | undefined;
218218

219-
for (let attempt = 0; attempt <= maxAttempts; attempt++) {
219+
for (let attempt = 0; attempt < maxAttempts; attempt++) {
220220
const [error, acquiredLock] = await tryCatch(this.redlock.acquire(sortedResources, duration));
221221

222222
if (!error && acquiredLock) {

0 commit comments

Comments
 (0)