Properly handle failed promises (#7488)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-12-17 15:43:55 +07:00 committed by GitHub
parent 45e84f730f
commit 898395d83d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
})
}
}
}