mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Fix prev commit - check for c_state == CLOSING first
This commit is contained in:
parent
dd15627a5e
commit
13ddc561d8
@ -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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user