Connection: pass localAddress to socket.connect()

fork
Victor Sklyar 9 years ago committed by Brian White
parent 00ef369670
commit 31e29ab772
No known key found for this signature in database
GPG Key ID: 606D7358F94DA209

@ -56,6 +56,7 @@ function Connection(config) {
config || (config = {});
this._config = {
localAddress: config.localAddress,
socket: config.socket,
socketTimeout: config.socketTimeout || 0,
host: config.host || 'localhost',
@ -282,7 +283,11 @@ Connection.prototype.connect = function() {
socket.destroy();
}, config.connTimeout);
socket.connect(config.port, config.host);
socket.connect({
port: config.port,
host: config.host,
localAddress: config.localAddress
});
};
Connection.prototype.serverSupports = function(cap) {

Loading…
Cancel
Save