Skip to content

Unbind clients in close() function #3

Open
emueller-sage opened this Issue Jun 15, 2012 · 4 comments

4 participants

@emueller-sage

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.

@vesse vesse added a commit to vesse/node-ldapauth-fork that referenced this issue Aug 22, 2013
@vesse vesse Unbind clients when closing
Previously no client was unbound (see trentm/node-ldapauth#3), now
unbinding both without keeping track if they were actually bound as this
seems to be working (and also destroy-method in ldapjs' connection pool
does so).
c232808
@njlg
njlg commented Jul 25, 2014

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

@wimvanleuven

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

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.

@trentm
Owner
trentm commented Sep 27, 2014

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.

@vesse vesse added a commit to vesse/node-ldapauth-fork that referenced this issue Feb 19, 2015
@vesse vesse Unbind clients when closing
Previously no client was unbound (see trentm/node-ldapauth#3), now
unbinding both without keeping track if they were actually bound as this
seems to be working (and also destroy-method in ldapjs' connection pool
does so).
edac1b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.