Skip to content

Commit 7612bbc

Browse files
author
Nuno Sousa
committed
Add support for overriding generic pool defaults
1 parent 3898f5d commit 7612bbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/pool.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ var pools = {
1717
}
1818
pool = genericPool.Pool({
1919
name: name,
20-
max: defaults.poolSize,
21-
idleTimeoutMillis: defaults.poolIdleTimeout,
22-
reapIntervalMillis: defaults.reapIntervalMillis,
23-
log: defaults.poolLog,
20+
max: clientConfig.poolSize || defaults.poolSize,
21+
idleTimeoutMillis: clientConfig.poolIdleTimeout || defaults.poolIdleTimeout,
22+
reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis,
23+
log: clientConfig.poolLog || defaults.poolLog,
2424
create: function(cb) {
2525
var client = new pools.Client(clientConfig);
2626
client.connect(function(err) {

0 commit comments

Comments
 (0)