]> err.no Git - varnish/commitdiff
Add more asserts to try to find a cure for #150.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 20 Aug 2007 07:35:10 +0000 (07:35 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 20 Aug 2007 07:35:10 +0000 (07:35 +0000)
Don't nuke t_end timestamp, we need it for StatSess logentry.

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

varnish-cache/bin/varnishd/cache_center.c

index bb01454ea6f115c445ac02d43abe4e1030c2481a..f0a21be9571c999cc67997bb53651b61ac356312 100644 (file)
@@ -211,12 +211,12 @@ cnt_done(struct sess *sp)
        sp->t_open = sp->t_end;
        sp->t_req = NAN;
        sp->t_resp = NAN;
-       sp->t_end = NAN;
        WSL_Flush(sp->wrk);
        if (sp->fd >= 0 && sp->doclose != NULL)
                vca_close_session(sp, sp->doclose);
        if (sp->fd < 0) {
                VSL_stats->sess_closed++;
+               assert(!isnan(sp->wrk->used));
                sp->wrk = NULL;
                vca_return_session(sp);
                return (1);
@@ -233,6 +233,7 @@ cnt_done(struct sess *sp)
                return (0);
        }
        VSL_stats->sess_herd++;
+       assert(!isnan(sp->wrk->used));
        sp->wrk = NULL;
        vca_return_session(sp);
        return (1);
@@ -523,6 +524,7 @@ 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));
                SES_Charge(sp);
                return (1);
        }
@@ -822,6 +824,7 @@ CNT_Session(struct sess *sp)
                if (w->nobjhead != NULL)
                        CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC);
        }
+       assert(!isnan(w->used));
        WSL_Flush(w);
 }