We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe6f32a commit 52aa25dCopy full SHA for 52aa25d
lib/pool.js
@@ -6,6 +6,7 @@ var genericPool = require('generic-pool');
6
7
module.exports = function(Client) {
8
var pools = {
9
+ Client: Client,
10
//dictionary of all key:pool pairs
11
all: {},
12
//reference to the client constructor - can override in tests or for require('pg').native
@@ -23,7 +24,7 @@ module.exports = function(Client) {
23
24
reapIntervalMillis: clientConfig.reapIntervalMillis || defaults.reapIntervalMillis,
25
log: clientConfig.poolLog || defaults.poolLog,
26
create: function(cb) {
- var client = new Client(clientConfig);
27
+ var client = new pools.Client(clientConfig);
28
// Ignore errors on pooled clients until they are connected.
29
client.on('error', Function.prototype);
30
client.connect(function(err) {
0 commit comments