Skip to content
Snippets Groups Projects
Commit f80e9d11 authored by Howard Chu's avatar Howard Chu
Browse files

Fix prev commit, spawns unnecessary threads.

parent 970ccf95
No related branches found
No related tags found
No related merge requests found
......@@ -368,8 +368,9 @@ ldap_pvt_thread_pool_submit (
return(0);
}
ldap_pvt_thread_cond_signal(&pool->ltp_cond);
if (pool->ltp_max_count <= 0
|| pool->ltp_open_count < pool->ltp_max_count)
if (pool->ltp_open_count < pool->ltp_active_count + pool->ltp_pending_count
&& (pool->ltp_open_count < pool->ltp_max_count ||
pool->ltp_max_count <= 0 ))
{
pool->ltp_open_count++;
pool->ltp_starting++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment