r2662 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jun 11 22:50:55 CEST 2008


Author: phk
Date: 2008-06-11 22:50:55 +0200 (Wed, 11 Jun 2008)
New Revision: 2662

Modified:
   trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
Be a little less hysteric with charging session statistics to
srcaddr and global counters.


Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2008-06-10 14:37:14 UTC (rev 2661)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2008-06-11 20:50:55 UTC (rev 2662)
@@ -232,7 +232,6 @@
 	    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 @@
 	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 @@
 		return (0);
 	}
 	VSL_stats->sess_herd++;
+	SES_Charge(sp);
 	assert(!isnan(sp->wrk->used));
 	sp->wrk = NULL;
 	vca_return_session(sp);




More information about the varnish-commit mailing list