Skip to content

Commit

Permalink
fix(r2-patch): await for mutex to be exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 23, 2024
1 parent 04640e7 commit 1b9db53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/r2-patch.ts
Expand Up @@ -28,7 +28,8 @@ export function patchR2Bucket(bucket: R2Bucket) {
}

async function get(...args: Parameters<R2Bucket["get"]>) {
if (_mutex) {
// eslint-disable-next-line no-unmodified-loop-condition
while (_mutex) {
await _mutex;
}
try {
Expand Down

0 comments on commit 1b9db53

Please sign in to comment.