diff --git a/src/util/subscription.ts b/src/util/subscription.ts index 2e04409..20e3d49 100755 --- a/src/util/subscription.ts +++ b/src/util/subscription.ts @@ -48,7 +48,7 @@ export abstract class FirehoseSubscriptionBase { const [collection] = commit.ops[0].path.split('/') if (includedRecords.has(collection)) { - while (runningEvents > 128) delay(1000) + while (runningEvents > 128) await delay(1000) await mutex.runExclusive(async () => { runningEvents++