Skip to content

Commit 7ae467a

Browse files
committed
Better comparison semantics
1 parent 9005403 commit 7ae467a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

db-service/lib/common/generic-pool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class Pool extends EventEmitter {
165165

166166
async #dispense() {
167167
const waiting = this._queue.length
168-
if (waiting < 1) return
168+
if (waiting === 0) return
169169
const capacity = this._available.size + this._creates.size
170170
const shortfall = waiting - capacity
171171
if (shortfall > 0 && this.size < this.options.max) {

0 commit comments

Comments
 (0)