From: phk Date: Mon, 18 Sep 2006 14:29:36 +0000 (+0000) Subject: Set worker idle timestamp to request end. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aa166d1025e5b45491c1a2425a55152662850b6;p=varnish Set worker idle timestamp to request end. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1074 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index af9cc631..04365f56 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -134,6 +134,7 @@ cnt_done(struct sess *sp) } clock_gettime(CLOCK_REALTIME, &sp->t_end); + sp->wrk->idle = sp->t_end.tv_sec; if (sp->xid == 0) { sp->t_req = sp->t_end; sp->t_resp = sp->t_end; @@ -155,7 +156,6 @@ cnt_done(struct sess *sp) vca_close_session(sp, sp->doclose); if (sp->fd < 0) { VSL_stats->sess_closed++; - sp->wrk->idle = sp->t_open.tv_sec; sp->wrk = NULL; vca_return_session(sp); return (1); @@ -172,7 +172,6 @@ cnt_done(struct sess *sp) return (0); } VSL_stats->sess_herd++; - sp->wrk->idle = sp->t_open.tv_sec; sp->wrk = NULL; vca_return_session(sp); return (1);