mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
Fix prev commit, c_writers check should be mutex'd
This commit is contained in:
parent
1a171b07d3
commit
dd15627a5e
1 changed files with 2 additions and 1 deletions
|
|
@ -761,8 +761,8 @@ void connection_closing( Connection *c, const char *why )
|
|||
connection_abandon( c );
|
||||
|
||||
/* wake write blocked operations */
|
||||
ldap_pvt_thread_mutex_lock( &c->c_write1_mutex );
|
||||
if ( c->c_writers > 0 ) {
|
||||
ldap_pvt_thread_mutex_lock( &c->c_write1_mutex );
|
||||
c->c_writers = -c->c_writers;
|
||||
ldap_pvt_thread_cond_broadcast( &c->c_write1_cv );
|
||||
ldap_pvt_thread_mutex_unlock( &c->c_write1_mutex );
|
||||
|
|
@ -778,6 +778,7 @@ void connection_closing( Connection *c, const char *why )
|
|||
}
|
||||
ldap_pvt_thread_mutex_unlock( &c->c_write1_mutex );
|
||||
} else {
|
||||
ldap_pvt_thread_mutex_unlock( &c->c_write1_mutex );
|
||||
slapd_clr_write( c->c_sd, 1 );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue