coopernurse / node-pool

Generic resource pooling for node.js
2.38k stars 259 forks source link

if min and max are both 1, the pool silently set the min to 0 #119

Closed molipet closed 8 years ago

molipet commented 8 years ago

As stated in the documentation:

min: minimum number of resources to keep in pool at any given time         if this is set > max, the pool will silently set the min to factory.max - 1

It looks to me that not only on min > max but also on min == max, the factory.max - 1 is applied. Resulting that min will be disregarded in case of max=1 and min=1.

sandfox commented 8 years ago

Ah yes :-) this has already been flagged in #79 and fixed in the v3 branch but never got round to fixing the docs for the current version (v2).

If you feel like making a small PR to fix the docs in this version that would be cool, otherwise I'll try and find some time next week.

molipet commented 8 years ago

Documentation is fixed in #120.

sandfox commented 8 years ago

thanks for this @molipet :100: