Avoid handling all errors now that blocking errors are handled properly
This commit is contained in:
parent
eda98986f2
commit
c27e14960e
|
@ -282,13 +282,13 @@ Client.prototype.bind = function bind (name,
|
|||
controls: controls
|
||||
})
|
||||
|
||||
// While we are binding to the server, register the callback as error handler
|
||||
// Connection errors will be reported to the bind callback too (useful when the LDAP server is not available)
|
||||
var self = this
|
||||
function callbackWrapper (err, ret) {
|
||||
self.removeListener('error', callbackWrapper)
|
||||
self.removeListener('connectError', callbackWrapper)
|
||||
callback(err, ret)
|
||||
}
|
||||
this.addListener('error', callbackWrapper)
|
||||
this.addListener('connectError', callbackWrapper)
|
||||
|
||||
return this._send(req, [errors.LDAP_SUCCESS], null, callbackWrapper, _bypass)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue