Open dilyanpalauzov opened 3 years ago
https://github.com/jjhoughton/napi-ldap/blob/master/main.js#L310 has this code:
LDAP.prototype.enqueue = function(msgid, fn) { if (msgid == -1 || this.ld === undefined) { if (this.ld.errorstring() === "Can't contact LDAP server") { Object.keys(this.queue).forEach( function fireTimeout(msgid) { this.queue[msgid](new LDAPError("Timeout")); delete this.queue[msgid]; this.ld.abandon(+msgid); }.bind(this) ); } process.nextTick( function emitError() { fn(new LDAPError(this.ld.errorstring())); }.bind(this) ); this.stats.errors++; return this; } }
When this.ld is undefined, this.ld.errorstring() cannot be called (twice - https://github.com/jjhoughton/napi-ldap/blob/master/main.js#L311 and https://github.com/jjhoughton/napi-ldap/blob/master/main.js#L329)
this.ld
this.ld.errorstring()
https://github.com/jjhoughton/napi-ldap/blob/master/main.js#L310 has this code:
When
this.ld
is undefined,this.ld.errorstring()
cannot be called (twice - https://github.com/jjhoughton/napi-ldap/blob/master/main.js#L311 and https://github.com/jjhoughton/napi-ldap/blob/master/main.js#L329)