Skip to content

Unbind clients in close() function #3

Open
@ghost

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions