Skip to content

Commit df2a24c

Browse files
committed
attach port always - ref brianc/node-postgres#604
1 parent 92c1fed commit df2a24c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function parse(str) {
2828
config.fallback_application_name = result.query.fallback_application_name;
2929
}
3030

31+
config.port = result.port;
3132
if(result.protocol == 'socket:') {
3233
config.host = decodeURI(result.pathname);
3334
config.database = result.query.db;
@@ -39,7 +40,6 @@ function parse(str) {
3940
var auth = (result.auth || ':').split(':');
4041
config.user = auth[0];
4142
config.password = auth[1];
42-
config.port = result.port;
4343

4444
var ssl = result.query.ssl;
4545
if (ssl === 'true' || ssl === '1') {

0 commit comments

Comments
 (0)