Skip to content

Commit

Permalink
Properly handle failed promises (#7488)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <[email protected]>
  • Loading branch information
haiodo authored Dec 17, 2024
1 parent 45e84f7 commit 898395d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ export class RateLimiter {
}

async waitProcessing (): Promise<void> {
await Promise.all(this.processingQueue.values())
while (this.processingQueue.size > 0) {
await new Promise<void>((resolve) => {
this.notify.push(resolve)
})
}
}
}

Expand Down

0 comments on commit 898395d

Please sign in to comment.