- Debug( LDAP_DEBUG_TRACE,
- "=>ldap_back_getconn: conn %p fetched (refcnt=%u)\n",
- (void *)lc, refcnt, 0 );
+ if ( li->li_idle_timeout != 0 && op->o_time > lc->lc_time + li->li_idle_timeout ) {
+ /* in case of failure, it frees/taints lc and sets it to NULL */
+ if ( ldap_back_retry( &lc, op, rs, sendok ) ) {
+ lc = NULL;
+ }
+ }
+
+ if ( lc ) {
+ Debug( LDAP_DEBUG_TRACE,
+ "=>ldap_back_getconn: conn %p fetched (refcnt=%u)\n",
+ (void *)lc, refcnt, 0 );
+ }
+ }
+
+ if ( li->li_idle_timeout && lc ) {
+ lc->lc_time = op->o_time;