Skip to content

Commit 90600f2

Browse files
twisha16brianc
authored andcommitted
Adding returnToHead in clientConfig param (brianc#1007)
1 parent 667953f commit 90600f2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/defaults.js

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ var defaults = module.exports = {
3333
//frequency to check for idle clients within the client pool
3434
reapIntervalMillis: 1000,
3535

36+
//if true the most recently released resources will be the first to be allocated
37+
returnToHead: false,
38+
3639
//pool log function / boolean
3740
poolLog: false,
3841

lib/pool.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = function(Client) {
2222
max: clientConfig.poolSize || defaults.poolSize,
2323
idleTimeoutMillis: clientConfig.poolIdleTimeout || defaults.poolIdleTimeout,
2424
reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis,
25+
returnToHead: clientConfig.returnToHead || defaults.returnToHead,
2526
log: clientConfig.poolLog || defaults.poolLog,
2627
create: function(cb) {
2728
var client = new pools.Client(clientConfig);

0 commit comments

Comments
 (0)