Commit 7127d5db authored by Ondřej Kuzník's avatar Ondřej Kuzník
Browse files

ITS#8850 Wait until backends are closed before freeing connection_pool

parent 33aa4405
......@@ -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());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment