Fixup handle_pause()

Return -1 if running on the main thread - which means there
are no worker threads to pause.
This commit is contained in:
Howard Chu 2017-04-09 15:39:44 +01:00
parent 2e011eeb67
commit 13c39b98b5

View File

@ -1031,6 +1031,8 @@ handle_pause( ldap_pvt_thread_pool_t *tpool, int pause_type )
{
ldap_int_thread_userctx_t *ctx = ldap_pvt_thread_pool_context();
pq = ctx->ltu_pq;
if ( !pq )
return(-1);
}
/* Let pool_unidle() ignore requests for new pauses */