]> err.no Git - varnish/commitdiff
Make sure wrk->used is always set when we park on an object, we might be
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 21 Aug 2007 09:23:31 +0000 (09:23 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 21 Aug 2007 09:23:31 +0000 (09:23 +0000)
unlucky multiple times in which case the responsibility falls back to
cnt_lookup().

Fixes 144.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1913 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_center.c

index f8fe51798bb21d2fbe8d2f4ec4ac7191e2d8a9dd..3650e3e7864bde1dfcaac85a18e95f8800fd5a2d 100644 (file)
@@ -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);
        }