From 7cd74dc2aa324859055d1e37780e1c42bcfcde54 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 11 Jun 2008 20:50:55 +0000 Subject: [PATCH] Be a little less hysteric with charging session statistics to 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 9732d97a..0f2e45b9 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -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); -- 2.39.5