File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -433,10 +433,16 @@ class Client extends EventEmitter {
433
433
async getConnection ( ) {
434
434
logger . silly ( "Creating control connection..." )
435
435
let currConnectionString = this . connectionString
436
- var client = new Client ( {
437
- connectionString : currConnectionString ,
438
- connectionTimeoutMillis : 10000 ,
439
- } ) ;
436
+ let client ;
437
+ if ( typeof currConnectionString !== "string" ) {
438
+ currConnectionString . connectionTimeoutMillis = 10000
439
+ client = new Client ( currConnectionString )
440
+ } else {
441
+ client = new Client ( {
442
+ connectionString : currConnectionString ,
443
+ connectionTimeoutMillis : 10000 ,
444
+ } ) ;
445
+ }
440
446
this . attachErrorListenerOnClientConnection ( client )
441
447
let lookup = util . promisify ( dns . lookup )
442
448
let addresses = [ { address : client . host } ]
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @yugabytedb/pg" ,
3
- "version" : " 8.7.3-yb-7 " ,
3
+ "version" : " 8.7.3-yb-8 " ,
4
4
"description" : " Pure JavaScript PostgreSQL client and native libpq bindings with YugabyteDB smart-driver features" ,
5
5
"keywords" : [
6
6
" database" ,
You can’t perform that action at this time.
0 commit comments