Closed Zerowalker closed 2 years ago
So i wonder if it's possible to have it try to reconnect at certain intervals?
My preference for the library is to include the least possible amount of policy, and reconnection handling is all policy: how many targets? how often? for how long? etc. Of course, it's perfectly possible to make a wrapper to handle these matters and forward the operations to inner connections. I just don't see it as part of the library.
Also, does dropping a
Ldap
handle equal anunbind
for just that one?
Not exactly, because LDAP is a multiplexed protocol, and an Ldap
handle is an endpoint of a multiplexed operation substream, whereas unbind
is (per spec) a global operation affecting the whole connection. Dropping the last Ldap
handle will have the effect of unbind
(closing the connection) but will not actually issue an Unbind operation (which is OK, servers must be prepared for that).
Since the first part is a WONTFIX, and the second a clarification not requiring a documentation update, I'll close this.
Ah, it made things a bit clearer. It just shows that i don't understand how the ldap connection works.
Thanks:)
From my understanding you can clone the
Ldap
handle and keep reusing the same connection. In my tests it works fine except if the connection is broken (say the server is unavailable). Then it will forever fail unless i remake the connection.So i wonder if it's possible to have it try to reconnect at certain intervals? That the cloned ldaps will fail during this is expected of course.
Also, does dropping a
Ldap
handle equal anunbind
for just that one? cause i noticed if iunbind
it will (as it says) close the connection which makes any futureLdap
closed as well, which kinda makes it "useless" for closing when sharing a connection.Thanks:)