]> git.sur5r.net Git - openldap/commitdiff
ITS#6220 don't check write timeouts when global_writetimeout isn't set
authorHoward Chu <hyc@openldap.org>
Tue, 21 Jul 2009 02:04:46 +0000 (02:04 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 21 Jul 2009 02:04:46 +0000 (02:04 +0000)
servers/slapd/connection.c

index 05e8122c62cdcfa6110bb61fe61b0e9f959de708..897a50c3bc8a1138d12e9f8024b92854f5c0b5e0 100644 (file)
@@ -249,7 +249,7 @@ int connections_timeout_idle(time_t now)
                        i++;
                        continue;
                }
-               if ( c->c_writewaiter ) {
+               if ( c->c_writewaiter && global_writetimeout ) {
                        writers = 1;
                        if( difftime( c->c_activitytime+global_writetimeout, now) < 0 ) {
                                /* close it */
@@ -260,7 +260,7 @@ int connections_timeout_idle(time_t now)
                }
        }
        connection_done( c );
-       if ( !writers )
+       if ( old && !writers )
                slapd_clr_writetime( old );
 
        return i;