<p>We are using OpenLDAP client library to conect to an LDAP server. The problem is that if there is no activity for some time, server (or firewall in the middle) drops TCP connection.</p>

<p>Our current implementation of "keep-alive" just does search for baseDN from time to time - any better ideas ? </p>

The only alternative seems to be reconnect:
```
```
ldap_set_option( ld, LDAP_OPT_RECONNECT, LDAP_OPT_ON );
```
```