]> git.sur5r.net Git - openldap/commitdiff
Don't expire a conn if it's still referenced
authorHoward Chu <hyc@openldap.org>
Wed, 24 Apr 2013 07:27:26 +0000 (00:27 -0700)
committerHoward Chu <hyc@openldap.org>
Wed, 24 Apr 2013 07:27:26 +0000 (00:27 -0700)
servers/slapd/back-meta/conn.c

index e428977055ef46d5c7f7ad06f8f38225b731fecb..da8e0a13e3cf536694dcf1ec22b62db1b1eaa138 100644 (file)
@@ -1180,8 +1180,8 @@ retry_lock:;
                                mc = NULL;
 
                        } else {
-                               if ( ( mi->mi_conn_ttl != 0 && op->o_time > mc->mc_create_time + mi->mi_conn_ttl )
-                                       || ( mi->mi_idle_timeout != 0 && op->o_time > mc->mc_time + mi->mi_idle_timeout ) )
+                               if ( mc->mc_refcnt == 0 && (( mi->mi_conn_ttl != 0 && op->o_time > mc->mc_create_time + mi->mi_conn_ttl )
+                                       || ( mi->mi_idle_timeout != 0 && op->o_time > mc->mc_time + mi->mi_idle_timeout )) )
                                {
 #if META_BACK_PRINT_CONNTREE > 0
                                        meta_back_print_conntree( mi,