mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-15 19:34:10 -05:00
ITS#8850 Wait until backends are closed before freeing connection_pool
This commit is contained in:
parent
33aa4405e5
commit
7127d5db11
2 changed files with 6 additions and 1 deletions
|
|
@ -3073,7 +3073,7 @@ loop:
|
|||
"slapd shutdown: waiting for %d operations/tasks to finish\n",
|
||||
t, 0, 0 );
|
||||
}
|
||||
ldap_pvt_thread_pool_destroy( &connection_pool, 1 );
|
||||
ldap_pvt_thread_pool_close( &connection_pool, 1 );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,6 +229,9 @@ int slap_shutdown( Backend *be )
|
|||
"%s shutdown: initiated\n",
|
||||
slap_name, 0, 0 );
|
||||
|
||||
/* Make sure the pool stops now even if we did not start up fully */
|
||||
ldap_pvt_thread_pool_close( &connection_pool, 1 );
|
||||
|
||||
/* let backends do whatever cleanup they need to do */
|
||||
return backend_shutdown( be );
|
||||
}
|
||||
|
|
@ -245,6 +248,8 @@ int slap_destroy(void)
|
|||
ber_bvarray_free( default_referral );
|
||||
}
|
||||
|
||||
ldap_pvt_thread_pool_free( &connection_pool );
|
||||
|
||||
/* clear out any thread-keys for the main thread */
|
||||
ldap_pvt_thread_pool_context_reset( ldap_pvt_thread_pool_context());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue