]> git.sur5r.net Git - openldap/commitdiff
Let the idletimeout check kill hung writers
authorHoward Chu <hyc@openldap.org>
Fri, 28 Nov 2008 23:45:56 +0000 (23:45 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 28 Nov 2008 23:45:56 +0000 (23:45 +0000)
servers/slapd/connection.c

index 4c3178e338c74a58b00cc00beabccb38e8f3259d..98a2432c5fffd8ba926cf9c457a1ccecbbcf1e1a 100644 (file)
@@ -225,8 +225,11 @@ int connections_timeout_idle(time_t now)
                c = connection_next( c, &connindex ) )
        {
                /* Don't timeout a slow-running request or a persistent
-                * outbound connection */
-               if( c->c_n_ops_executing || c->c_conn_state == SLAP_C_CLIENT ) {
+                * outbound connection. But if it has a writewaiter, see
+                * if the waiter has been there too long.
+                */
+               if(( c->c_n_ops_executing && !c->c_writewaiter)
+                       || c->c_conn_state == SLAP_C_CLIENT ) {
                        continue;
                }