Skip to content

Commit 786f2ee

Browse files
authored
Added localAddress to connect options
1 parent 15b6950 commit 786f2ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var Client = function(config) {
2828
this.host = this.connectionParameters.host;
2929
this.password = this.connectionParameters.password;
3030
this.replication = this.connectionParameters.replication;
31+
this.localAddress = this.connectionParameters.localAddress;
3132

3233
var c = config || {};
3334

@@ -60,7 +61,7 @@ Client.prototype.connect = function(callback) {
6061
if(this.host && this.host.indexOf('/') === 0) {
6162
con.connect(this.host + '/.s.PGSQL.' + this.port);
6263
} else {
63-
con.connect(this.port, this.host);
64+
con.connect(this.port, this.host, this.localAddress);
6465
}
6566

6667

0 commit comments

Comments
 (0)