Skip to content

Commit

Permalink
fix pool limit check
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Feb 7, 2024
1 parent 8085ee0 commit eadfb2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/async-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class ConcurrentPool<T> implements AsyncQueue<T> {
return;
}

if (this.concurrent <= this.size) {
if (this.concurrent < this.size) {
const promise = this.stack.shift();
promise?.resolve(promise.fn());

Expand Down

0 comments on commit eadfb2e

Please sign in to comment.