Fix prev commit - check for c_state == CLOSING first

This commit is contained in:
Howard Chu 2009-01-15 21:31:58 +00:00
parent dd15627a5e
commit 13ddc561d8

View File

@ -144,6 +144,10 @@ static long send_ldap_ber(
/* write only one pdu at a time - wait til it's our turn */
ldap_pvt_thread_mutex_lock( &conn->c_write1_mutex );
if ( connection_state_closing( conn )) {
ldap_pvt_thread_mutex_unlock( &conn->c_write1_mutex );
return 0;
}
while ( conn->c_writers > 0 ) {
ldap_pvt_thread_cond_wait( &conn->c_write1_cv, &conn->c_write1_mutex );
}