Closed anupbaldawa closed 5 years ago
good catch, as I wrote that code over 2 years ago I'm not exactly sure what the intention was but I strongly expect that I just wasn't paying attention to that case. I'll gladly except a PR that does something like:
if (opts.maxWaitingClients != undefined) {
// @ts-ignore
this.maxWaitingClients = parseInt(opts.maxWaitingClients, 10);
}
Here is the PR: https://github.com/coopernurse/node-pool/pull/235
Thanks Anup
I have created another PR with test cases. https://github.com/coopernurse/node-pool/pull/236
I want my code to fail when I set
maxWaitingClients
to0
.I looked into the code and it seems that if I pass in
0
, then it is ignored as theif condition
is false.https://github.com/coopernurse/node-pool/blob/master/lib/PoolOptions.js#L75