mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#8747 Protect shutdown code while workers are still alive
This commit is contained in:
parent
8e4d7ffe79
commit
cba03e49a4
@ -1332,10 +1332,14 @@ lloadd_daemon( struct event_base *daemon_base )
|
||||
|
||||
/* Mark upstream connections closing and prevent from opening new ones */
|
||||
LDAP_CIRCLEQ_FOREACH ( b, &backend, b_next ) {
|
||||
epoch_t epoch = epoch_join();
|
||||
|
||||
checked_lock( &b->b_mutex );
|
||||
b->b_numconns = b->b_numbindconns = 0;
|
||||
backend_reset( b, 1 );
|
||||
checked_unlock( &b->b_mutex );
|
||||
|
||||
epoch_leave( epoch );
|
||||
}
|
||||
|
||||
/* Do the same for clients */
|
||||
|
Loading…
Reference in New Issue
Block a user