int i;
assert(sp->xid == 0);
- sp->wrk->idle = sp->t_open.tv_sec;
- if (http_RecvPrepAgain(sp->http)) {
- sp->step = STP_RECV;
- return (0);
- }
do
i = http_RecvSome(sp->fd, sp->http);
while (i == -1);
}
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;
sp->xid = 0;
sp->t_open = sp->t_end;
+ SES_Charge(sp);
if (sp->fd > 0) {
VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port);
* XXX: here to see if something is pending in the kernel
*/
+ if (http_RecvPrepAgain(sp->http)) {
+ sp->step = STP_RECV;
+ return (0);
+ }
if (sp->http->t < sp->http->v) {
sp->step = STP_AGAIN;
return (0);
}
}
- SES_Charge(sp);
+ sp->wrk->idle = sp->t_open.tv_sec;
vca_return_session(sp);
return (1);
}