]> git.sur5r.net Git - openldap/commitdiff
ITS#5469 check earlier for write waiters
authorHoward Chu <hyc@openldap.org>
Tue, 15 Apr 2008 22:17:50 +0000 (22:17 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 15 Apr 2008 22:17:50 +0000 (22:17 +0000)
servers/slapd/connection.c

index a42e7ace3faba3c2d7d43cd86460f06b72cd11ad..c4b858dc3b825950879f93c396047466e4d9ae72 100644 (file)
@@ -1621,6 +1621,9 @@ connection_resched( Connection *conn )
 {
        Operation *op;
 
+       if( conn->c_writewaiter )
+               return 0;
+
        if( conn->c_conn_state == SLAP_C_CLOSING ) {
                Debug( LDAP_DEBUG_TRACE, "connection_resched: "
                        "attempting closing conn=%lu sd=%d\n",
@@ -1629,7 +1632,7 @@ connection_resched( Connection *conn )
                return 0;
        }
 
-       if( conn->c_conn_state != SLAP_C_ACTIVE || conn->c_writewaiter ) {
+       if( conn->c_conn_state != SLAP_C_ACTIVE ) {
                /* other states need different handling */
                return 0;
        }