mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-16 03:44:58 -05:00
use mutex to protect connection in connection_destroy until task is complete
This commit is contained in:
parent
2b17be8329
commit
e72b5e5c61
1 changed files with 2 additions and 0 deletions
|
|
@ -322,6 +322,7 @@ connection_destroy( Connection *c )
|
|||
assert( c->c_conn_state != SLAP_C_INVALID );
|
||||
assert( c->c_ops == NULL );
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &connections_mutex );
|
||||
c->c_struct_state = SLAP_C_UNUSED;
|
||||
c->c_conn_state = SLAP_C_INVALID;
|
||||
|
||||
|
|
@ -359,6 +360,7 @@ connection_destroy( Connection *c )
|
|||
}
|
||||
|
||||
lber_pvt_sb_destroy( &c->c_sb );
|
||||
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||
}
|
||||
|
||||
int connection_state_closing( Connection *c )
|
||||
|
|
|
|||
Loading…
Reference in a new issue