Just wondering if there is a proper way to close a connection?
What I'm "trying" to do is follow the pattern in the documentation. Start with a bind() using an admin account, and then findandbind() to authenticate the user. After that I'd like to close both connections.
When I close() inside of my findandbind() callback I get the below error from OpenLDAP (osixia/openldap). Testing against Microsoft AD yields no such error. Looking at the OpenLDAP logs it appears that after every search the initial/admin connection sends ABANDON, is that expected behavior? Does the library automatically close connections when done?
.../node_modules/ldap-client/index.js:255
this.ld.abandon(msgid);
^
TypeError: Cannot read property 'abandon' of undefined
at LDAP.searchTimeout (.../node_modules/ldap-client/index.js:255:16)
at ontimeout (timers.js:469:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:264:5)
Just wondering if there is a proper way to close a connection?
What I'm "trying" to do is follow the pattern in the documentation. Start with a
bind()
using an admin account, and thenfindandbind()
to authenticate the user. After that I'd like to close both connections.When I
close()
inside of myfindandbind()
callback I get the below error from OpenLDAP (osixia/openldap). Testing against Microsoft AD yields no such error. Looking at the OpenLDAP logs it appears that after every search the initial/admin connection sends ABANDON, is that expected behavior? Does the library automatically close connections when done?Here's the code: