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

Make sure wrk->used is always set when we park on an object, we might be

unlucky multiple times in which case the responsibility falls back to
cnt_lookup().

Fixes 144.





git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1913 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d0b25515
......@@ -524,7 +524,12 @@ cnt_lookup(struct sess *sp)
*/
WSL(sp->wrk, SLT_Debug, sp->fd,
"on waiting list on obj %u", sp->obj->xid);
assert(!isnan(sp->wrk->used));
/*
* There is a non-zero risk that we come here more than once
* before we get through, in that case cnt_recv must be set
*/
if (isnan(sp->wrk->used))
sp->wrk->used = TIM_real();
SES_Charge(sp);
return (1);
}
......
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