Skip to content

Commit

Permalink
Include port as a connection parameter for socket connections
Browse files Browse the repository at this point in the history
  • Loading branch information
markyen committed Jun 12, 2014
1 parent 3eccf5c commit fa17b68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connection-parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var parse = function(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 @@ -50,7 +51,6 @@ var parse = function(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 All @@ -66,7 +66,7 @@ var useSsl = function() {
return false;
case "prefer":
case "require":
case "verify-ca":
case "verify-ca":
case "verify-full":
return true;
}
Expand Down

0 comments on commit fa17b68

Please sign in to comment.