-
Notifications
You must be signed in to change notification settings - Fork 455
the client reconnection is not documented #392
Comments
with this option can reconnect but not rebind. I 'm working to figure out how to do a rebind after client reconnect. |
@ivanhuay Did you find a solution for your problem? |
@strebl Not for the moment I check the results of the query and based on that I make a rebind or not |
A little late, maybe. For others enter this issue later: // e.g. in your client's class constructor
this.ldapClient = ldap.createClient({
url: ldap_url,
reconnect: {
initialDelay: 100,
maxDelay: 1000,
failAfter: 10
}
});
const client = this.ldapClient;
// do a rebind when reconnect
this.ldapClient.on('connect', function () {
client.bind(ldap_user, ldap_pwd, err => {
if (err) {
logger.error('error while ldap binding' + err);
}
});
}); |
Will this cause bind to execute twice on the first connect? |
I found the client not trigger connect event even if I set reconnect parameter to |
Please include a minimal reproducible example |
I was having some problems connecting to a balanced ldap and reading the code I found the solution undocumented.
The text was updated successfully, but these errors were encountered: