Skip to content

Commit

Permalink
Adding returnToHead in clientConfig param (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
twisha16 authored and brianc committed Jun 7, 2016
1 parent 667953f commit 90600f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
1 change: 1 addition & 0 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 90600f2

Please sign in to comment.