()
| 537 | } |
| 538 | |
| 539 | #cleanup() { |
| 540 | const toDestroy = Math.min(this.#idleClients.length, this.totalClients - this.#options.minimum); |
| 541 | for (let i = 0; i < toDestroy; i++) { |
| 542 | // TODO: shift vs pop |
| 543 | const client = this.#idleClients.shift()! |
| 544 | client.destroy(); |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | sendCommand( |
| 549 | args: Array<RedisArgument>, |
no test coverage detected