diff --git a/lib/Connection.js b/lib/Connection.js index 619862ff..83229d8c 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -283,11 +283,13 @@ Connection.prototype.connect = function() { socket.destroy(); }, config.connTimeout); - socket.connect({ - port: config.port, - host: config.host, - localAddress: config.localAddress - }); + if (isUndefinedOrNull(socket.remoteAddress)) { + socket.connect({ + port: config.port, + host: config.host, + localAddress: config.localAddress + }); + } }; Connection.prototype.serverSupports = function(cap) {