GH-35 reference error in client connect()

This commit is contained in:
Mark Cavage 2011-11-14 09:23:33 -08:00
parent 868c46bde4
commit caf258a4f7
2 changed files with 5 additions and 3 deletions

View File

@ -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');
});

View File

@ -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"