]> err.no Git - varnish/commitdiff
Be a little less hysteric with charging session statistics to
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 11 Jun 2008 20:50:55 +0000 (20:50 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 11 Jun 2008 20:50:55 +0000 (20:50 +0000)
srcaddr and global counters.

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

varnish-cache/bin/varnishd/cache_center.c

index 9732d97a490c27e79e1b12489083d527336b2e8f..0f2e45b9a8186553efbe6934c0355cd462507dde 100644 (file)
@@ -232,7 +232,6 @@ cnt_done(struct sess *sp)
            sp->xid, sp->t_req, sp->t_end, dh, dp, da);
 
        sp->xid = 0;
-       SES_Charge(sp);
        sp->t_open = sp->t_end;
        sp->t_resp = NAN;
        WSL_Flush(sp->wrk, 0);
@@ -246,6 +245,7 @@ cnt_done(struct sess *sp)
        if (sp->fd >= 0 && sp->doclose != NULL)
                vca_close_session(sp, sp->doclose);
        if (sp->fd < 0) {
+               SES_Charge(sp);
                VSL_stats->sess_closed++;
                assert(!isnan(sp->wrk->used));
                sp->wrk = NULL;
@@ -268,6 +268,7 @@ cnt_done(struct sess *sp)
                return (0);
        }
        VSL_stats->sess_herd++;
+       SES_Charge(sp);
        assert(!isnan(sp->wrk->used));
        sp->wrk = NULL;
        vca_return_session(sp);