diff --git a/lib/defaults.js b/lib/defaults.js index 3b37e367..19195c8e 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -33,6 +33,9 @@ var defaults = module.exports = { //frequency to check for idle clients within the client pool reapIntervalMillis: 1000, + //if true the most recently released resources will be the first to be allocated + returnToHead: false, + //pool log function / boolean poolLog: false, diff --git a/lib/pool.js b/lib/pool.js index d05a16ff..7e51f48b 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -22,6 +22,7 @@ module.exports = function(Client) { max: clientConfig.poolSize || defaults.poolSize, idleTimeoutMillis: clientConfig.poolIdleTimeout || defaults.poolIdleTimeout, reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis, + returnToHead: clientConfig.returnToHead || defaults.returnToHead, log: clientConfig.poolLog || defaults.poolLog, create: function(cb) { var client = new pools.Client(clientConfig);