Commit fb838a2f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix timestamps in shm tag StatSess for sessions with no requests.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@974 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 839b3614
......@@ -245,27 +245,24 @@ cnt_first(struct sess *sp)
SES_RefSrcAddr(sp);
for (;;) {
i = http_RecvSome(sp->fd, sp->http);
switch (i) {
case -1:
if (i == -1)
continue;
case 0:
if (i == 0) {
sp->step = STP_RECV;
return (0);
case 1:
}
if (i == 1)
vca_close_session(sp, "overflow");
SES_Charge(sp);
vca_return_session(sp);
sp->step = STP_DONE;
return (1);
case 2:
else if (i == 2)
vca_close_session(sp, "no request");
SES_Charge(sp);
vca_return_session(sp);
sp->step = STP_DONE;
return (1);
default:
else
INCOMPL();
}
clock_gettime(CLOCK_REALTIME, &sp->t_end);
sp->wrk->idle = sp->t_end.tv_sec;
SES_Charge(sp);
vca_return_session(sp);
sp->step = STP_DONE;
return (1);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment