Skip to content

Commit

Permalink
attach port always - ref brianc/node-postgres#604
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jul 6, 2014
1 parent 92c1fed commit df2a24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -28,6 +28,7 @@ function parse(str) {
config.fallback_application_name = result.query.fallback_application_name;
}

config.port = result.port;
if(result.protocol == 'socket:') {
config.host = decodeURI(result.pathname);
config.database = result.query.db;
Expand All @@ -39,7 +40,6 @@ function parse(str) {
var auth = (result.auth || ':').split(':');
config.user = auth[0];
config.password = auth[1];
config.port = result.port;

var ssl = result.query.ssl;
if (ssl === 'true' || ssl === '1') {
Expand Down

0 comments on commit df2a24c

Please sign in to comment.