vesse / node-ldapauth-fork

Simple node.js module to authenticate against an LDAP server
Other
127 stars 79 forks source link

ldapClient.close() times-out frequently #45

Closed ORESoftware closed 7 years ago

ORESoftware commented 7 years ago

I have this code:

   let ldap;
    try {
      ldap = new LdapAuth(config.ldap);
    } catch (err) {
      console.error(err);
      return cb(err);
    }

/// some time later...

  ldap.close(function(err){
       // sometimes this doesn't get called
    });

from my testing, it appears that the ldap.close() call times out frequently, might there be a good reason for that? no idea why

vesse commented 7 years ago

I noticed problems with that too at least when an error is omitted. No idea why though, close just calls unbind to both the clients. Maybe look into ldapjs if you could identify something from there?