From eac2f955178555333e4fc04803d8fa5573e1dfdd Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Mon, 28 Nov 2011 10:39:07 -0800 Subject: [PATCH] Client logging undefined --- lib/client.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client.js b/lib/client.js index b299073..a239190 100644 --- a/lib/client.js +++ b/lib/client.js @@ -802,7 +802,7 @@ Client.prototype._newConnection = function() { log.trace('%s connect event', c.ldap.id); c.ldap.connected = true; - c.ldap.id += ':' + c.fd; + c.ldap.id += c.fd ? (':' + c.fd) : ''; c.emit('connect', true); }); c.setKeepAlive = function(enable, delay) { @@ -819,7 +819,7 @@ Client.prototype._newConnection = function() { // Wrap the events c.ldap = { - id: connectOpts.socketPath || self.url.hostname, + id: self.url ? self.url.hostname : connectOpts.socketPath, messageID: 0, messages: {} }; @@ -835,7 +835,7 @@ Client.prototype._newConnection = function() { log.trace('%s connect event', c.ldap.id); c.ldap.connected = true; - c.ldap.id += ':' + c.fd; + c.ldap.id += c.fd ? (':' + c.fd) : ''; self.emit('connect', c.ldap.id); });