Commit f0b50447 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Release wrk->vcl before (potentially) long-running worker jobs which do

not need it (acceptor, h2_sess)
parent 14136d4a
......@@ -460,6 +460,10 @@ vca_accept_task(struct worker *wrk, void *arg)
while (!pool_accepting)
VTIM_sleep(.1);
/* Dont hold on to (possibly) discarded VCLs */
if (wrk->vcl != NULL)
VCL_Rel(&wrk->vcl);
while (!ps->pool->die) {
INIT_OBJ(&wa, WRK_ACCEPT_MAGIC);
wa.acceptlsock = ls;
......@@ -547,12 +551,6 @@ vca_accept_task(struct worker *wrk, void *arg)
if (!ps->pool->die && DO_DEBUG(DBG_SLOW_ACCEPTOR))
VTIM_sleep(2.0);
/*
* We were able to hand off, so release this threads VCL
* reference (if any) so we don't hold on to discarded VCLs.
*/
if (wrk->vcl != NULL)
VCL_Rel(&wrk->vcl);
}
}
......
......@@ -344,6 +344,9 @@ h2_new_session(struct worker *wrk, void *arg)
sp = req->sp;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
if (wrk->vcl)
VCL_Rel(&wrk->vcl);
assert(req->transport == &H2_transport);
assert (req->err_code == H2_PU_MARKER || req->err_code == H2_OU_MARKER);
......
Markdown is supported
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