node-ldapauth icon indicating copy to clipboard operation
node-ldapauth copied to clipboard

Unbind clients in close() function

Open ghost opened this issue 12 years ago • 4 comments

After invoking the close() function in lib/ldapauth.js, node will not terminate normally because _adminClient and _userClient are still bound. I suggest to rewrite the code in order to unbind both clients. Suggestion (not very good because it does not regard errors when unbinding _adminClient):

LdapAuth.prototype.close = function (callback) {
 var self = this;
  self._adminClient.unbind(function (err) {
    self._userClient.unbind(function (err2) {
       callback(err2) });})

By the way, I have not seen that _adminBound is set to true, therefore I think that in the current close() function, the _adminClient will never be unbound.

ghost avatar Jun 15 '12 08:06 ghost

Looks like this issue is still a problem with the current version (2.2.4).

njlg avatar Jul 25 '14 23:07 njlg

I confirm it is an issue in 2.2.4. However I see the code is alraedy adapted to adjust for this problem.

Anyone knows what the plans are for a new release? It the head code stable enough?

wimvanleuven avatar Sep 25 '14 12:09 wimvanleuven

I'm switching to vesse's ldapauth-fork to work around these issues. It's a pity that this deviates for a bug that remains pending for so long ... or just a new release is not created.

wimvanleuven avatar Sep 25 '14 12:09 wimvanleuven

Yah, sorry guys. I'm currently seeing if vesse would like to take over node-ldapauth... whether using his ldapauth-fork name or ldapauth in npm.

trentm avatar Sep 27 '14 04:09 trentm