File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 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 {
433433 async getConnection ( ) {
434434 logger . silly ( "Creating control connection..." )
435435 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+ }
440446 this . attachErrorListenerOnClientConnection ( client )
441447 let lookup = util . promisify ( dns . lookup )
442448 let addresses = [ { address : client . host } ]
Original file line number Diff line number Diff line change 11{
22 "name" : " @yugabytedb/pg" ,
3- "version" : " 8.7.3-yb-7 " ,
3+ "version" : " 8.7.3-yb-8 " ,
44 "description" : " Pure JavaScript PostgreSQL client and native libpq bindings with YugabyteDB smart-driver features" ,
55 "keywords" : [
66 " database" ,
You can’t perform that action at this time.
0 commit comments