File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,18 @@ PG.prototype.connect = function(config, callback) {
46
46
callback = config ;
47
47
config = null ;
48
48
}
49
- var poolName = config || '__DEFAULT' ;
49
+ var poolName = JSON . stringify ( config || { } ) ;
50
50
if ( typeof config == 'string' ) {
51
51
config = new ConnectionParameters ( config ) ;
52
52
}
53
53
54
+ config = config || { } ;
55
+
56
+ //for backwards compatibility
57
+ config . max = config . max || config . poolSize || defaults . poolSize ;
58
+ config . idleTimeoutMillis = config . idleTimeoutMillis || config . poolIdleTimeout || defaults . poolIdleTimeout ;
59
+ config . log = config . log || config . poolLog || defaults . poolLog ;
60
+
54
61
this . pools [ poolName ] = this . pools [ poolName ] || new Pool ( config , this . Client ) ;
55
62
var pool = this . pools [ poolName ] ;
56
63
pool . connect ( callback ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ var async = require('async')
4
4
var testWithoutDomain = function ( cb ) {
5
5
test ( 'no domain' , function ( ) {
6
6
assert ( ! process . domain )
7
- console . log ( helper . pg . Client )
8
7
helper . pg . connect ( helper . config , assert . success ( function ( client , done ) {
9
8
assert ( ! process . domain )
10
9
done ( )
You can’t perform that action at this time.
0 commit comments