This commit is contained in:
Adria Navarro 2023-11-29 22:09:09 +01:00
parent 9c12c5b62e
commit 078384941a
1 changed files with 2 additions and 6 deletions

View File

@ -169,11 +169,7 @@ export async function doWithLock<T>(
throw e
}
} finally {
if (timeout) {
clearTimeout(timeout)
}
if (lock) {
await lock.unlock()
}
clearTimeout(timeout)
await lock?.unlock()
}
}