Revert redundant changes
This commit is contained in:
parent
23e44b2959
commit
f0c864ca85
|
@ -798,9 +798,9 @@ Client.prototype.connect = function connect () {
|
|||
self.url = self.urls[self._nextServer]
|
||||
|
||||
if (self.url) {
|
||||
self.host = url.hostname
|
||||
self.port = url.port
|
||||
self.secure = url.secure
|
||||
self.host = self.url.hostname
|
||||
self.port = self.url.port
|
||||
self.secure = self.url.secure
|
||||
}
|
||||
|
||||
cb = once(cb)
|
||||
|
@ -831,13 +831,12 @@ Client.prototype.connect = function connect () {
|
|||
setupClient(cb)
|
||||
}
|
||||
|
||||
var port = (self.urls.length && self.urls[self._nextServer].port) || self.socketPath
|
||||
var hostname = (self.urls.length && self.urls[self._nextServer].hostname) || undefined
|
||||
var port = (self.port || self.socketPath)
|
||||
if (self.secure) {
|
||||
socket = tls.connect(port, hostname, self.tlsOptions)
|
||||
socket = tls.connect(port, self.host, self.tlsOptions)
|
||||
socket.once('secureConnect', onConnect)
|
||||
} else {
|
||||
socket = net.connect(port, hostname)
|
||||
socket = net.connect(port, self.host)
|
||||
socket.once('connect', onConnect)
|
||||
}
|
||||
socket.once('error', onResult)
|
||||
|
|
Loading…
Reference in New Issue