From caf258a4f7a841c99bd7adf4760d690e84ed575d Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Mon, 14 Nov 2011 09:23:33 -0800 Subject: [PATCH] GH-35 reference error in client connect() --- lib/client.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/client.js b/lib/client.js index b885169..b299073 100644 --- a/lib/client.js +++ b/lib/client.js @@ -177,8 +177,10 @@ Client.prototype.connect = function(callback) { this.connection.on('connect', function() { if (self._bindDN && self._credentials) return self.bind(self._bindDN, self._credentials, function(err) { - if (err) - c.end(); + if (err) { + self.log.error('Unable to bind(on(\'connect\')): %s', err.stack); + self.connection.end(); + } self.emit('connect'); }); diff --git a/package.json b/package.json index 83309e0..f40c7a7 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "ldapjs", "homepage": "http://ldapjs.org", "description": "LDAP client and server APIs", - "version": "0.3.0", + "version": "0.3.1", "repository": { "type": "git", "url": "git://github.com/mcavage/node-ldapjs.git"